Class QueueEnqueueImpl
java.lang.Object
org.eclipse.ecf.core.sharedobject.util.QueueEnqueueImpl
- All Implemented Interfaces:
IQueueEnqueue
-
Constructor Summary
-
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 viaIQueueEnqueue.enqueue_prepare(Event[])
void
enqueue_commit
(Object enqueue_key) Commit a set of Event instances previously prepared viaIQueueEnqueue.enqueue_prepare(Event[])
boolean
enqueue_lossy
(Event element) Enqueue the given event with lossy enqueuing.enqueue_prepare
(Event[] elements) Prepare an enqueue of a set of Event instances.Get enqueue processor for this queue.void
Set enqueue processor for this queue.int
size()
Return size of contents in queue
-
Constructor Details
-
Method Details
-
enqueue
Description copied from interface:IQueueEnqueue
Enqueue a given Event onto the underlying queue- Specified by:
enqueue
in interfaceIQueueEnqueue
- Parameters:
element
-- Throws:
QueueException
- not thrown by this implementation.
-
enqueue
Description copied from interface:IQueueEnqueue
Enqueue a set of events Event onto the underlying queue- Specified by:
enqueue
in interfaceIQueueEnqueue
- Parameters:
elements
- the Events to enqueue- Throws:
QueueException
- thrown if events cannot be enqueued
-
enqueue_prepare
Description copied from interface:IQueueEnqueue
Prepare an enqueue of a set of Event instances. The Object returned should subsequently be used to either commit the prepared enqueue transaction (IQueueEnqueue.enqueue_commit(Object)
, or to abort the prepared enqueue transactionIQueueEnqueue.enqueue_abort(Object)
- Specified by:
enqueue_prepare
in interfaceIQueueEnqueue
- Parameters:
elements
-- Returns:
- Object
- Throws:
QueueException
- not thrown by this implementation.
-
enqueue_commit
Description copied from interface:IQueueEnqueue
Commit a set of Event instances previously prepared viaIQueueEnqueue.enqueue_prepare(Event[])
- Specified by:
enqueue_commit
in interfaceIQueueEnqueue
- Parameters:
enqueue_key
- the transaction key previously returned from the call toIQueueEnqueue.enqueue_prepare(Event[])
-
enqueue_abort
Description copied from interface:IQueueEnqueue
Abort the commit of a set of Event instances previously prepared viaIQueueEnqueue.enqueue_prepare(Event[])
- Specified by:
enqueue_abort
in interfaceIQueueEnqueue
- Parameters:
enqueue_key
- the transaction key previously returned from the call toIQueueEnqueue.enqueue_prepare(Event[])
-
enqueue_lossy
Description copied from interface:IQueueEnqueue
Enqueue the given event with lossy enqueuing.- Specified by:
enqueue_lossy
in interfaceIQueueEnqueue
- Parameters:
element
- the event to- Returns:
- true if enqueued successfully, false if not
-
getEnqueueProcessor
Description copied from interface:IQueueEnqueue
Get enqueue processor for this queue. Returns the enqueue processor previously assigned via theIQueueEnqueue.setEnqueueProcessor(IEnqueueProcessor)
. Returns null if no enqueue processor previously assigned- Specified by:
getEnqueueProcessor
in interfaceIQueueEnqueue
- Returns:
- IEnqueueProcessor previously assigned via
IQueueEnqueue.setEnqueueProcessor(IEnqueueProcessor)
-
size
public int size()Description copied from interface:IQueueEnqueue
Return size of contents in queue- Specified by:
size
in interfaceIQueueEnqueue
- Returns:
- int size of queue contents. Zero if empty
-