public interface QueueBase<T> extends Closeable
Modifier and Type | Method and Description |
---|---|
boolean |
flushPuts(long waitTime,
TimeUnit timeUnit)
Wait until any pending puts are committed
|
int |
getLastMessageCount()
Return the most recent message count from the queue.
|
Listenable<QueuePutListener<T>> |
getPutListenerContainer()
Return the manager for put listeners
|
void |
setErrorMode(ErrorMode newErrorMode)
Used when the queue is created with a
QueueBuilder.lockPath(String) . |
void |
start()
Start the queue.
|
void start() throws Exception
Exception
- startup errorsListenable<QueuePutListener<T>> getPutListenerContainer()
void setErrorMode(ErrorMode newErrorMode)
QueueBuilder.lockPath(String)
. Determines
the behavior when the queue consumer throws an exceptionnewErrorMode
- the new error mode (the default is ErrorMode.REQUEUE
boolean flushPuts(long waitTime, TimeUnit timeUnit) throws InterruptedException
waitTime
- max wait timetimeUnit
- time unitInterruptedException
- if thread was interruptedint getLastMessageCount()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.