Class OSGiJobCoordinator
- java.lang.Object
 - 
- org.opendaylight.infrautils.jobcoordinator.internal.OSGiJobCoordinator
 
 
- 
- All Implemented Interfaces:
 JobCoordinator,JobCoordinatorMonitor
@Beta public final class OSGiJobCoordinator extends Object implements JobCoordinator, JobCoordinatorMonitor
 
- 
- 
Field Summary
- 
Fields inherited from interface org.opendaylight.infrautils.jobcoordinator.JobCoordinator
DEFAULT_MAX_RETRIES 
 - 
 
- 
Constructor Summary
Constructors Constructor Description OSGiJobCoordinator() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenqueueJob(String key, Callable<List<? extends com.google.common.util.concurrent.ListenableFuture<?>>> mainWorker, RollbackCallable rollbackWorker, int maxRetries)Enqueues a job with a rollback task and max retries.longgetClearedTaskCount()Returns the cleared task count.longgetCreatedTaskCount()Returns the created task count.longgetFailedJobCount()Returns the failed jobs count.longgetIncompleteTaskCount()Returns the incomplete task count.longgetPendingTaskCount()Returns the pending task count.longgetRetriesCount()Returns the retry jobs count.StringtoString()- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.opendaylight.infrautils.jobcoordinator.JobCoordinator
enqueueJob, enqueueJob, enqueueJob 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getClearedTaskCount
public long getClearedTaskCount()
Description copied from interface:JobCoordinatorMonitorReturns the cleared task count.- Specified by:
 getClearedTaskCountin interfaceJobCoordinatorMonitor
 
- 
getCreatedTaskCount
public long getCreatedTaskCount()
Description copied from interface:JobCoordinatorMonitorReturns the created task count.- Specified by:
 getCreatedTaskCountin interfaceJobCoordinatorMonitor
 
- 
getIncompleteTaskCount
public long getIncompleteTaskCount()
Description copied from interface:JobCoordinatorMonitorReturns the incomplete task count.- Specified by:
 getIncompleteTaskCountin interfaceJobCoordinatorMonitor
 
- 
getPendingTaskCount
public long getPendingTaskCount()
Description copied from interface:JobCoordinatorMonitorReturns the pending task count.- Specified by:
 getPendingTaskCountin interfaceJobCoordinatorMonitor
 
- 
getFailedJobCount
public long getFailedJobCount()
Description copied from interface:JobCoordinatorMonitorReturns the failed jobs count.- Specified by:
 getFailedJobCountin interfaceJobCoordinatorMonitor
 
- 
getRetriesCount
public long getRetriesCount()
Description copied from interface:JobCoordinatorMonitorReturns the retry jobs count.- Specified by:
 getRetriesCountin interfaceJobCoordinatorMonitor
 
- 
enqueueJob
public void enqueueJob(String key, Callable<List<? extends com.google.common.util.concurrent.ListenableFuture<?>>> mainWorker, RollbackCallable rollbackWorker, int maxRetries)
Description copied from interface:JobCoordinatorEnqueues a job with a rollback task and max retries. See class level documentation above for details re. the retry strategy.- Specified by:
 enqueueJobin interfaceJobCoordinatorrollbackWorker- 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.- See Also:
 JobCoordinator.enqueueJob(String, Callable, RollbackCallable),JobCoordinator.enqueueJob(String, Callable, int)
 
- 
toString
public String toString()
- Specified by:
 toStringin interfaceJobCoordinatorMonitor- Overrides:
 toStringin classObject
 
 - 
 
 -