Search in sources :

Example 1 with CleanUpJob

use of org.opendaylight.genius.idmanager.jobs.CleanUpJob in project genius by opendaylight.

the class IdManager method scheduleCleanUpTask.

private void scheduleCleanUpTask(final IdLocalPool localIdPoolCache, final String parentPoolName, final int blockSize) {
    TimerTask scheduledTask = new TimerTask() {

        @Override
        public void run() {
            CleanUpJob job = new CleanUpJob(localIdPoolCache, txRunner, broker, parentPoolName, blockSize, lockManager, idUtils, jobCoordinator);
            jobCoordinator.enqueueJob(localIdPoolCache.getPoolName(), job, IdUtils.RETRY_COUNT);
        }
    };
    cleanJobTimer.schedule(scheduledTask, IdUtils.DEFAULT_DELAY_TIME * 1000);
}
Also used : TimerTask(java.util.TimerTask) CleanUpJob(org.opendaylight.genius.idmanager.jobs.CleanUpJob)

Aggregations

TimerTask (java.util.TimerTask)1 CleanUpJob (org.opendaylight.genius.idmanager.jobs.CleanUpJob)1