E
- The type of object on the queueV
- The type of task to executepublic abstract class QueueProcessorCallable<E,V> extends Object implements Callable<String>
Modifier and Type | Field and Description |
---|---|
protected boolean |
inactivate |
protected org.apache.commons.collections4.queue.CircularFifoQueue<V> |
latestResults |
protected DelayQueue<DelayWrapper<E>> |
pendingQueueItem |
protected Queue<E> |
queue |
Constructor and Description |
---|
QueueProcessorCallable() |
Modifier and Type | Method and Description |
---|---|
String |
call()
runs the queue processor until interrupted.
|
protected abstract void |
cleanupTask(E queueItem) |
protected boolean |
isInactivated()
override this method (and possibly setIsInactivated) to set the
activation status by properties
|
protected abstract Callable<V> |
prepareTask(E queueItem)
builds the repeatable task
|
protected void |
setIsInactivated(boolean inactivate)
Change the processing state of this instance
|
void |
setQueue(Queue<E> queue) |
void |
setThreadPoolTaskExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor) |
protected boolean inactivate
protected DelayQueue<DelayWrapper<E>> pendingQueueItem
protected org.apache.commons.collections4.queue.CircularFifoQueue<V> latestResults
public void setThreadPoolTaskExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor)
protected abstract void cleanupTask(E queueItem)
protected void setIsInactivated(boolean inactivate)
inactivate
- - true to inactivate, false to keep active.protected boolean isInactivated()
Copyright © 2021. All rights reserved.