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()
Lifecycle
public void stop()
Lifecycle
public int getFinished()
getFinished
in interface QueueService
public int getWaiters()
getWaiters
in interface QueueService
public int getCurrents()
getCurrents
in interface QueueService
public java.util.List<JobInfo> getWaitersInfo()
getWaitersInfo
in interface QueueService
public <T> java.util.concurrent.Future<T> submit(Job<T> callable, Callback<T> callback, java.lang.String description)
QueueService
submit
in interface QueueService
callable
- 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)
QueueService
submit
in interface QueueService
callable
- the jobdescription
- a description of the jobpublic <T> java.util.concurrent.Future<T> submit(Job<T> callable)
QueueService
submit
in interface QueueService
callable
- the jobpublic void addQueueListener(QueueListener listener)
QueueService
QueueListener
that will be notified on events relative to this QueueService
.addQueueListener
in interface QueueService
listener
- added listenerpublic void removeQueueListener(QueueListener listener)
QueueService
QueueListener
from this QueueService
.removeQueueListener
in interface QueueService
listener
- removed listenerCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.