Package org.opennms.core.ipc.sink.api
Interface AsyncPolicy
-
public interface AsyncPolicy
Defines the behavior of asynchronous dispatching.- Author:
- jwhite
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getNumThreads()
Number of background threads that will be used to dispatch messages from the queue.int
getQueueSize()
Maximum number of messages that can be queued awaiting for dispatch.boolean
isBlockWhenFull()
Used to control the behavior of a dispatch when the queue is full.
-
-
-
Method Detail
-
getQueueSize
int getQueueSize()
Maximum number of messages that can be queued awaiting for dispatch.- Returns:
- queue size
-
getNumThreads
int getNumThreads()
Number of background threads that will be used to dispatch messages from the queue.- Returns:
- number of threads
-
isBlockWhenFull
boolean isBlockWhenFull()
Used to control the behavior of a dispatch when the queue is full. Whentrue
the calling thread will be blocked until the queue can accept the message, or the thread is interrupted. Whenfalse
the dispatch will return a future with aRejectedExecutionException
/- Returns:
- whether or not the thread calling dispatch should block when the queue is full
-
-