Interface IQueueEnqueue
- All Known Subinterfaces:
IQueue
- All Known Implementing Classes:
QueueEnqueueImpl
public interface IQueueEnqueue
Queue enqueing semantics
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Enqueue a given Event onto the underlying queuevoid
Enqueue a set of events Event onto the underlying queuevoid
enqueue_abort
(Object enqueue_key) Abort the commit of a set of Event instances previously prepared viaenqueue_prepare(Event[])
void
enqueue_commit
(Object enqueue_key) Commit a set of Event instances previously prepared viaenqueue_prepare(Event[])
boolean
enqueue_lossy
(Event event) Enqueue the given event with lossy enqueuing.enqueue_prepare
(Event[] events) Prepare an enqueue of a set of Event instances.Get enqueue processor for this queue.void
setEnqueueProcessor
(IEnqueueProcessor processor) Set enqueue processor for this queue.int
size()
Return size of contents in queue
-
Method Details
-
enqueue
Enqueue a given Event onto the underlying queue- Parameters:
event
- the Event to enqueue- Throws:
QueueException
- thrown if event cannot be enqueued
-
enqueue
Enqueue a set of events Event onto the underlying queue- Parameters:
events
- the Events to enqueue- Throws:
QueueException
- thrown if events cannot be enqueued
-
enqueue_prepare
Prepare an enqueue of a set of Event instances. The Object returned should subsequently be used to either commit the prepared enqueue transaction (enqueue_commit(Object)
, or to abort the prepared enqueue transactionenqueue_abort(Object)
- Parameters:
events
- the events to enqueue- Returns:
- Object representing the transaction
- Throws:
QueueException
- if preparation for enqueue cannot occur
-
enqueue_commit
Commit a set of Event instances previously prepared viaenqueue_prepare(Event[])
- Parameters:
enqueue_key
- the transaction key previously returned from the call toenqueue_prepare(Event[])
-
enqueue_abort
Abort the commit of a set of Event instances previously prepared viaenqueue_prepare(Event[])
- Parameters:
enqueue_key
- the transaction key previously returned from the call toenqueue_prepare(Event[])
-
enqueue_lossy
Enqueue the given event with lossy enqueuing.- Parameters:
event
- the event to- Returns:
- true if enqueued successfully, false if not
-
getEnqueueProcessor
IEnqueueProcessor getEnqueueProcessor()Get enqueue processor for this queue. Returns the enqueue processor previously assigned via thesetEnqueueProcessor(IEnqueueProcessor)
. Returns null if no enqueue processor previously assigned- Returns:
- IEnqueueProcessor previously assigned via
setEnqueueProcessor(IEnqueueProcessor)
-
size
int size()Return size of contents in queue- Returns:
- int size of queue contents. Zero if empty
-