Interface QueueBase<T>
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
DistributedDelayQueue,DistributedIdQueue,DistributedPriorityQueue,DistributedQueue
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWait until any pending puts are committedintReturn the most recent message count from the queue.org.apache.curator.framework.listen.Listenable<QueuePutListener<T>> Return the manager for put listenersvoidsetErrorMode(ErrorMode newErrorMode) Used when the queue is created with aQueueBuilder.lockPath(String).voidstart()Start the queue.
-
Method Details
-
start
-
getPutListenerContainer
org.apache.curator.framework.listen.Listenable<QueuePutListener<T>> getPutListenerContainer()Return the manager for put listeners- Returns:
- put listener container
-
setErrorMode
Used when the queue is created with aQueueBuilder.lockPath(String). Determines the behavior when the queue consumer throws an exception- Parameters:
newErrorMode- the new error mode (the default isErrorMode.REQUEUE
-
flushPuts
Wait until any pending puts are committed- Parameters:
waitTime- max wait timetimeUnit- time unit- Returns:
- true if the flush was successful, false if it timed out first
- Throws:
InterruptedException- if thread was interrupted
-
getLastMessageCount
int getLastMessageCount()Return the most recent message count from the queue. This is useful for debugging/information purposes only.- Returns:
- count (can be 0)
-