public interface QueueService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ASYNCHRONOUS_QUEUE_MODE
Asynchronous queue mode.
|
static java.lang.String |
GLOABL_QUEUE_SCOPE
Global queue scope.
|
static java.lang.String |
PREFERENCE_QUEUE_MODE
Preference queue mode.
|
static java.lang.String |
QUEUE_MODE_PROPERTY
The service property specifying the queue mode (sync/async/pref).
|
static java.lang.String |
QUEUE_SCOPE_PROPERTY
The service property specifying the queue scope (global/...).
|
static java.lang.String |
SYNCHRONOUS_QUEUE_MODE
Synchronous queue mode.
|
Modifier and Type | Method and Description |
---|---|
void |
addQueueListener(QueueListener listener)
Add a
QueueListener that will be notified on events relative to this QueueService . |
int |
getCurrents() |
int |
getFinished() |
int |
getWaiters() |
java.util.List<JobInfo> |
getWaitersInfo() |
void |
removeQueueListener(QueueListener listener)
Remove a
QueueListener from this QueueService . |
<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.
|
static final java.lang.String QUEUE_MODE_PROPERTY
static final java.lang.String SYNCHRONOUS_QUEUE_MODE
static final java.lang.String ASYNCHRONOUS_QUEUE_MODE
static final java.lang.String PREFERENCE_QUEUE_MODE
static final java.lang.String QUEUE_SCOPE_PROPERTY
static final java.lang.String GLOABL_QUEUE_SCOPE
int getFinished()
int getWaiters()
int getCurrents()
java.util.List<JobInfo> getWaitersInfo()
<T> java.util.concurrent.Future<T> submit(Job<T> callable, Callback<T> callback, java.lang.String description)
callable
- the jobcallback
- callback called when the job is processeddescription
- a description of the job<T> java.util.concurrent.Future<T> submit(Job<T> callable, java.lang.String description)
callable
- the jobdescription
- a description of the job<T> java.util.concurrent.Future<T> submit(Job<T> callable)
callable
- the jobvoid addQueueListener(QueueListener listener)
QueueListener
that will be notified on events relative to this QueueService
.listener
- added listenervoid removeQueueListener(QueueListener listener)
QueueListener
from this QueueService
.listener
- removed listenerCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.