@Singleton public class BaseAsyncTaskMonitor extends BaseMonitoringService implements AsyncTaskMonitor
AsyncTask
objects.Modifier and Type | Field and Description |
---|---|
protected AsyncTaskStatusMonitor |
taskMonitor |
context, eventBus, pollingDelay, scheduler
Constructor and Description |
---|
BaseAsyncTaskMonitor(RestContext<AbiquoApi,AbiquoAsyncApi> context,
ScheduledExecutorService scheduler,
Long pollingDelay,
com.google.common.eventbus.EventBus eventBus,
AsyncTaskStatusMonitor monitor) |
Modifier and Type | Method and Description |
---|---|
void |
awaitCompletion(AsyncTask... tasks)
Monitor the given
AsyncTask s and block until they finishe. |
void |
awaitCompletion(Long maxWait,
TimeUnit timeUnit,
AsyncTask... tasks)
Monitor the given
AsyncTask s and block until they finish. |
void |
monitor(AsyncTask... tasks)
Monitor the given
AsyncTask s and populate an event when they finish. |
void |
monitor(Long maxWait,
TimeUnit timeUnit,
AsyncTask... tasks)
Monitor the given
AsyncTask s and populate an event when they finish. |
awaitCompletion, awaitCompletion, getAsyncTaskMonitor, getConversionMonitor, getVirtualApplianceMonitor, getVirtualMachineMonitor, monitor, monitor, register, unregister
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
awaitCompletion, awaitCompletion, getAsyncTaskMonitor, getConversionMonitor, getVirtualApplianceMonitor, getVirtualMachineMonitor, monitor, monitor, register, unregister
protected AsyncTaskStatusMonitor taskMonitor
@Inject public BaseAsyncTaskMonitor(RestContext<AbiquoApi,AbiquoAsyncApi> context, @Named(value="jclouds.scheduler-threads") ScheduledExecutorService scheduler, @Named(value="abiquo.monitor-delay") Long pollingDelay, com.google.common.eventbus.EventBus eventBus, AsyncTaskStatusMonitor monitor)
public void awaitCompletion(AsyncTask... tasks)
AsyncTaskMonitor
AsyncTask
s and block until they finishe.awaitCompletion
in interface AsyncTaskMonitor
tasks
- The AsyncTask
s to monitor.public void monitor(AsyncTask... tasks)
AsyncTaskMonitor
AsyncTask
s and populate an event when they finish.monitor
in interface AsyncTaskMonitor
tasks
- The AsyncTask
s to monitor.public void awaitCompletion(Long maxWait, TimeUnit timeUnit, AsyncTask... tasks)
AsyncTaskMonitor
AsyncTask
s and block until they finish.awaitCompletion
in interface AsyncTaskMonitor
maxWait
- The maximum time to wait.timeUnit
- The time unit for the maxWait parameter.tasks
- The AsyncTask
s to monitor.public void monitor(Long maxWait, TimeUnit timeUnit, AsyncTask... tasks)
AsyncTaskMonitor
AsyncTask
s and populate an event when they finish.monitor
in interface AsyncTaskMonitor
maxWait
- The maximum time to wait.timeUnit
- The time unit for the maxWait parameter.tasks
- The AsyncTask
s to monitor.Copyright © 2009-2013 jclouds. All Rights Reserved.