A simple in-memory queue that offers no persistence between process restarts
Fields inherited from class | Fields |
---|---|
class AbstractHookQueue |
started |
Constructor and description |
---|
InMemoryQueue
(WhoasQueueConfig queueConfig) Create the InMemoryQueue from configuration |
InMemoryQueue
() Default constructor |
InMemoryQueue
(java.util.Queue<HookRequest> queue) Create the InMemoryQueue with the given Queue object |
Type | Name and description |
---|---|
java.lang.Long |
getSize() Return the number of elements in the queue |
void |
pop(groovy.lang.Closure action) Performs a blocking pop on the queue and invokes the closure with the item popped from the queue |
java.lang.Boolean |
push(HookRequest request) Attempt to insert the request into the queue |
Methods inherited from class | Name |
---|---|
class AbstractHookQueue |
getSize, pop, push, start, stop |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Create the InMemoryQueue from configuration
Default constructor
Create the InMemoryQueue with the given Queue object
Return the number of elements in the queue
Performs a blocking pop on the queue and invokes the closure with the item popped from the queue If the Closure throws an exception, the dequeued item will be returned to the tail end of the queue
Attempt to insert the request into the queue If the request cannot be inserted, this method will return false, otherwise true.