|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.oozie.service.CallableQueueService
public class CallableQueueService
The callable queue service queues XCallable
s for asynchronous execution.
CONF_QUEUE_SIZE
size of the immmediate execution queue. Defaulf value is 1000. #CONF_DELAYED_QUEUE_SIZE
size of the delayed execution queue. Defaulf value is 1000. CONF_THREADS
number of threads in the threadpool used for asynchronous command execution. When this number of threads is reached,
commands remain the queue until threads become available.
Sets up a priority queue for the execution of Commands via a ThreadPool. Sets up a Delyaed Queue to handle actions
which will be ready for execution sometime in the future.
Field Summary | |
---|---|
static int |
CONCURRENCY_DELAY
|
static String |
CONF_CALLABLE_CONCURRENCY
|
static String |
CONF_PREFIX
|
static String |
CONF_QUEUE_SIZE
|
static String |
CONF_THREADS
|
static int |
SAFE_MODE_DELAY
|
Constructor Summary | |
---|---|
CallableQueueService()
|
Method Summary | |
---|---|
void |
destroy()
Destroy the command queue service. |
Class<? extends Service> |
getInterface()
Return the public interface for command queue service. |
List<String> |
getQueueDump()
Get the list of strings of queue dump |
void |
init(Services services)
Initialize the command queue service. |
void |
instrument(Instrumentation instr)
Instruments the callable queue service. |
boolean |
queue(XCallable<Void> callable)
Queue a callable for asynchronous execution. |
boolean |
queue(XCallable<Void> callable,
long delay)
Queue a callable for asynchronous execution sometime in the future. |
boolean |
queueSerial(List<? extends XCallable<Void>> callables)
Queue a list of callables for serial execution. |
boolean |
queueSerial(List<? extends XCallable<Void>> callables,
long delay)
Queue a list of callables for serial execution sometime in the future. |
int |
queueSize()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONF_PREFIX
public static final String CONF_QUEUE_SIZE
public static final String CONF_THREADS
public static final String CONF_CALLABLE_CONCURRENCY
public static final int CONCURRENCY_DELAY
public static final int SAFE_MODE_DELAY
Constructor Detail |
---|
public CallableQueueService()
Method Detail |
---|
public void init(Services services)
init
in interface Service
services
- services instance.public void destroy()
destroy
in interface Service
public Class<? extends Service> getInterface()
getInterface
in interface Service
CallableQueueService
.public int queueSize()
public boolean queue(XCallable<Void> callable)
callable
- callable to queue.
true
if the callable was queued, false
if the queue is full and the callable
was not queued.public boolean queueSerial(List<? extends XCallable<Void>> callables)
callables
- callables to be executed by the composite callable.
true
if the callables were queued, false
if the queue is full and the callables
were not queued.public boolean queue(XCallable<Void> callable, long delay)
callable
- callable to queue for delayed executiondelay
- time, in milliseconds, that the callable should be delayed.
true
if the callable was queued, false
if the queue is full and the callable
was not queued.public boolean queueSerial(List<? extends XCallable<Void>> callables, long delay)
callables
- callables to be executed by the composite callable.delay
- time, in milliseconds, that the callable should be delayed.
true
if the callables were queued, false
if the queue is full and the callables
were not queued.public void instrument(Instrumentation instr)
instrument
in interface Instrumentable
instr
- instance to instrument the callable queue service to.public List<String> getQueueDump()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |