org.eclipse.ecf.core.sharedobject.util

## Class QueueEnqueueImpl

- java.lang.Object
- - org.eclipse.ecf.core.sharedobject.util.QueueEnqueueImpl

All Implemented Interfaces:
  IQueueEnqueue

    public class QueueEnqueueImpl
    extends Object
    implements IQueueEnqueue

### Constructor Summary

Constructors
Constructor and Description
`QueueEnqueueImpl(SimpleFIFOQueue impl)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `enqueue_abort(Object enqueue_key)` Abort the commit of a set of Event instances previously prepared via `IQueueEnqueue.enqueue_prepare(Event[])`
`void` `enqueue_commit(Object enqueue_key)` Commit a set of Event instances previously prepared via `IQueueEnqueue.enqueue_prepare(Event[])`
`boolean` `enqueue_lossy(Event element)` Enqueue the given event with lossy enqueuing.
`Object` `enqueue_prepare(Event[] elements)` Prepare an enqueue of a set of Event instances.
`void` `enqueue(Event element)` Enqueue a given Event onto the underlying queue
`void` `enqueue(Event[] elements)` Enqueue a set of events Event onto the underlying queue
`IEnqueueProcessor` `getEnqueueProcessor()` Get enqueue processor for this queue.
`void` `setEnqueueProcessor(IEnqueueProcessor pred)` Set enqueue processor for this queue.
`int` `size()` Return size of contents in queue

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### QueueEnqueueImpl

    public QueueEnqueueImpl(SimpleFIFOQueue impl)

### Method Detail

#### enqueue

    public void enqueue(Event element)
                 throws QueueException

Description copied from interface: `IQueueEnqueue`
Enqueue a given Event onto the underlying queue

Specified by:
  `enqueue` in interface `IQueueEnqueue`
Parameters:
  `element` -
Throws:
  `QueueException` - not thrown by this implementation.

#### enqueue

    public void enqueue(Event[] elements)
                 throws QueueException

Description copied from interface: `IQueueEnqueue`
Enqueue a set of events Event onto the underlying queue

Specified by:
  `enqueue` in interface `IQueueEnqueue`
Parameters:
  `elements` - the Events to enqueue
Throws:
  `QueueException` - thrown if events cannot be enqueued

#### enqueue_prepare

    public Object enqueue_prepare(Event[] elements)
                           throws QueueException

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 transaction `IQueueEnqueue.enqueue_abort(Object)`

Specified by:
  `enqueue_prepare` in interface `IQueueEnqueue`
Parameters:
  `elements` -
Returns:
  Object
Throws:
  `QueueException` - not thrown by this implementation.

#### enqueue_commit

    public void enqueue_commit(Object enqueue_key)

Description copied from interface: `IQueueEnqueue`
Commit a set of Event instances previously prepared via `IQueueEnqueue.enqueue_prepare(Event[])`

Specified by:
  `enqueue_commit` in interface `IQueueEnqueue`
Parameters:
  `enqueue_key` - the transaction key previously returned from the call to `IQueueEnqueue.enqueue_prepare(Event[])`

#### enqueue_abort

    public void enqueue_abort(Object enqueue_key)

Description copied from interface: `IQueueEnqueue`
Abort the commit of a set of Event instances previously prepared via `IQueueEnqueue.enqueue_prepare(Event[])`

Specified by:
  `enqueue_abort` in interface `IQueueEnqueue`
Parameters:
  `enqueue_key` - the transaction key previously returned from the call to `IQueueEnqueue.enqueue_prepare(Event[])`

#### enqueue_lossy

    public boolean enqueue_lossy(Event element)

Description copied from interface: `IQueueEnqueue`
Enqueue the given event with lossy enqueuing.

Specified by:
  `enqueue_lossy` in interface `IQueueEnqueue`
Parameters:
  `element` - the event to
Returns:
  true if enqueued successfully, false if not

#### setEnqueueProcessor

    public void setEnqueueProcessor(IEnqueueProcessor pred)

Description copied from interface: `IQueueEnqueue`
Set enqueue processor for this queue. The given processor, if non-null, will be consulted when and enqueue operation is requested to determine whether the enqueue should occur or not

Specified by:
  `setEnqueueProcessor` in interface `IQueueEnqueue`
Parameters:
  `pred` - the IEnqueueProcessor for this queue. Should not be null.

#### getEnqueueProcessor

    public IEnqueueProcessor getEnqueueProcessor()

Description copied from interface: `IQueueEnqueue`
Get enqueue processor for this queue. Returns the enqueue processor previously assigned via the `IQueueEnqueue.setEnqueueProcessor(IEnqueueProcessor)`. Returns null if no enqueue processor previously assigned

Specified by:
  `getEnqueueProcessor` in interface `IQueueEnqueue`
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 interface `IQueueEnqueue`
Returns:
  int size of queue contents. Zero if empty