public class WorkerExitOnEmpty extends WorkerImpl
JobExecutor.State| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_LOOPS_ON_EMPTY_QUEUES |
config, emptyQueueSleepTime, jedis, listenerDelegate, namespace, queueNames, reconnectAttempts, reconnectSleepTime, stateALL_QUEUES| Constructor and Description |
|---|
WorkerExitOnEmpty(Config config,
Collection<String> queues,
Map<String,? extends Class<?>> jobTypes) |
WorkerExitOnEmpty(Config config,
Collection<String> queues,
Map<String,? extends Class<?>> jobTypes,
int maxLoopsOnEmptyQueues) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
poll()
Polls the queues for jobs and executes them.
Exits if all queues are empty maxLoopOnEmptyQueues times |
addJobType, addListener, addListener, addQueue, checkJobType, checkJobTypes, checkPaused, checkQueues, createName, end, execute, failMsg, failure, getExceptionHandler, getJobTypes, getName, getQueues, getReconnectAttempts, getWorkerId, isPaused, isProcessingJob, isShutdown, isThreadNameChangingEnabled, join, key, pauseMsg, process, recoverFromException, removeAllListeners, removeAllListeners, removeAllQueues, removeJobName, removeJobType, removeListener, removeListener, removeQueue, renameThread, run, setExceptionHandler, setJobTypes, setQueues, setThreadNameChangingEnabled, statusMsg, success, togglePause, toStringpublic static final int DEFAULT_MAX_LOOPS_ON_EMPTY_QUEUES
public WorkerExitOnEmpty(Config config, Collection<String> queues, Map<String,? extends Class<?>> jobTypes)
protected void poll()
poll in class WorkerImplWorkerImpl.poll()Copyright © 2011-2013. All Rights Reserved.