public abstract class ForwardingQueueService extends java.lang.Object implements LifecycleQueueService
LifecycleQueueService.ASYNCHRONOUS_QUEUE_MODE, GLOABL_QUEUE_SCOPE, PREFERENCE_QUEUE_MODE, QUEUE_MODE_PROPERTY, QUEUE_SCOPE_PROPERTY, SYNCHRONOUS_QUEUE_MODE| Constructor and Description |
|---|
ForwardingQueueService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addQueueListener(QueueListener listener)
Add a
QueueListener that will be notified on events relative to this QueueService. |
protected abstract LifecycleQueueService |
delegate() |
int |
getCurrents() |
int |
getFinished() |
int |
getWaiters() |
java.util.List<JobInfo> |
getWaitersInfo() |
void |
removeQueueListener(QueueListener listener)
Remove a
QueueListener from this QueueService. |
void |
start()
Start the service.
|
void |
stop()
Stop the service.
|
<T> java.util.concurrent.Future<T> |
submit(Job<T> callable)
Submits a job to the queue service.
|
<T> java.util.concurrent.Future<T> |
submit(Job<T> callable,
Callback<T> callback,
java.lang.String description)
Submits a job to the queue service.
|
<T> java.util.concurrent.Future<T> |
submit(Job<T> callable,
java.lang.String description)
Submits a job to the queue service.
|
protected abstract LifecycleQueueService delegate()
public void start()
Lifecyclepublic void stop()
Lifecyclepublic int getFinished()
getFinished in interface QueueServicepublic int getWaiters()
getWaiters in interface QueueServicepublic int getCurrents()
getCurrents in interface QueueServicepublic java.util.List<JobInfo> getWaitersInfo()
getWaitersInfo in interface QueueServicepublic <T> java.util.concurrent.Future<T> submit(Job<T> callable, Callback<T> callback, java.lang.String description)
QueueServicesubmit in interface QueueServicecallable - the jobcallback - callback called when the job is processeddescription - a description of the jobpublic <T> java.util.concurrent.Future<T> submit(Job<T> callable, java.lang.String description)
QueueServicesubmit in interface QueueServicecallable - the jobdescription - a description of the jobpublic <T> java.util.concurrent.Future<T> submit(Job<T> callable)
QueueServicesubmit in interface QueueServicecallable - the jobpublic void addQueueListener(QueueListener listener)
QueueServiceQueueListener that will be notified on events relative to this QueueService.addQueueListener in interface QueueServicelistener - added listenerpublic void removeQueueListener(QueueListener listener)
QueueServiceQueueListener from this QueueService.removeQueueListener in interface QueueServicelistener - removed listenerCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.