@Singleton
 @OsgiServiceProvider(classes={JobCoordinator.class,JobCoordinatorMonitor.class})
public class JobCoordinatorImpl
extends Object
implements JobCoordinator, JobCoordinatorMonitor
DEFAULT_MAX_RETRIES| Constructor and Description | 
|---|
JobCoordinatorImpl()
Deprecated. 
 
This no-arg constructor (and related changes) temporarily
             allowing a JobCoordinatorImpl without specifying a global shared
             MetricProvider will be removed again as soon as https://git.opendaylight.org/gerrit/#/c/67516/
             and https://git.opendaylight.org/gerrit/#/c/67641/ are finally merged... 
 | 
JobCoordinatorImpl(MetricProvider metricProvider)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
destroy()  | 
void | 
enqueueJob(String key,
          Callable<List<com.google.common.util.concurrent.ListenableFuture<Void>>> mainWorker)
Enqueues a job with DEFAULT_MAX_RETRIES (3) retries. 
 | 
void | 
enqueueJob(String key,
          Callable<List<com.google.common.util.concurrent.ListenableFuture<Void>>> mainWorker,
          int maxRetries)
Enqueues a job with max retries. 
 | 
void | 
enqueueJob(String key,
          Callable<List<com.google.common.util.concurrent.ListenableFuture<Void>>> mainWorker,
          RollbackCallable rollbackWorker)
Enqueues a job with a rollback task and DEFAULT_MAX_RETRIES (3) retries.. 
 | 
void | 
enqueueJob(String key,
          Callable<List<com.google.common.util.concurrent.ListenableFuture<Void>>> mainWorker,
          RollbackCallable rollbackWorker,
          int maxRetries)
Enqueues a job with a rollback task and max retries. 
 | 
long | 
getClearedTaskCount()
Returns the cleared task count. 
 | 
long | 
getCreatedTaskCount()
Returns the created task count. 
 | 
long | 
getExecuteAttempts()
Returns the job execution attempts. 
 | 
long | 
getFailedJobCount()
Returns the failed jobs count. 
 | 
long | 
getIncompleteTaskCount()
Returns the incomplete task count. 
 | 
protected Thread | 
getJobQueueHandlerThread()  | 
long | 
getPendingTaskCount()
Returns the pending task count. 
 | 
long | 
getRetriesCount()
Returns the retry jobs count. 
 | 
String | 
toString()  | 
@Deprecated public JobCoordinatorImpl()
@Inject public JobCoordinatorImpl(MetricProvider metricProvider)
@PreDestroy public void destroy()
public void enqueueJob(String key, Callable<List<com.google.common.util.concurrent.ListenableFuture<Void>>> mainWorker)
JobCoordinatorenqueueJob in interface JobCoordinatorkey - The job's key. Jobs with the same key are run sequentially.
            Jobs with different keys are run in parallel.mainWorker - The task that runs for the job.public void enqueueJob(String key, Callable<List<com.google.common.util.concurrent.ListenableFuture<Void>>> mainWorker, RollbackCallable rollbackWorker)
JobCoordinatorenqueueJob in interface JobCoordinatorrollbackWorker - The rollback task which runs in case the job's main task
            fails.JobCoordinator.enqueueJob(String, Callable)public void enqueueJob(String key, Callable<List<com.google.common.util.concurrent.ListenableFuture<Void>>> mainWorker, int maxRetries)
JobCoordinatorenqueueJob in interface JobCoordinatormaxRetries - The maximum number of retries for the job's main task until it
            succeeds.JobCoordinator.enqueueJob(String, Callable)public void enqueueJob(String key, Callable<List<com.google.common.util.concurrent.ListenableFuture<Void>>> mainWorker, @Nullable RollbackCallable rollbackWorker, int maxRetries)
JobCoordinatorenqueueJob in interface JobCoordinatorrollbackWorker - The rollback task which runs in case the job's main task
            fails.maxRetries - The maximum number of retries for the job's main task until it
            succeeds.JobCoordinator.enqueueJob(String, Callable, RollbackCallable), 
JobCoordinator.enqueueJob(String, Callable, int)public long getClearedTaskCount()
JobCoordinatorMonitorgetClearedTaskCount in interface JobCoordinatorMonitorpublic long getCreatedTaskCount()
JobCoordinatorMonitorgetCreatedTaskCount in interface JobCoordinatorMonitorpublic long getIncompleteTaskCount()
JobCoordinatorMonitorgetIncompleteTaskCount in interface JobCoordinatorMonitorpublic long getPendingTaskCount()
JobCoordinatorMonitorgetPendingTaskCount in interface JobCoordinatorMonitorpublic long getFailedJobCount()
JobCoordinatorMonitorgetFailedJobCount in interface JobCoordinatorMonitorpublic long getRetriesCount()
JobCoordinatorMonitorgetRetriesCount in interface JobCoordinatorMonitorpublic long getExecuteAttempts()
JobCoordinatorMonitorgetExecuteAttempts in interface JobCoordinatorMonitorprotected Thread getJobQueueHandlerThread()
public String toString()
toString in interface JobCoordinatorMonitortoString in class ObjectCopyright © 2019 OpenDaylight. All rights reserved.