org.mule.util.queue
Class DefaultQueueStoreDelegate

java.lang.Object
  extended by org.mule.util.queue.AbstractQueueStoreDelegate
      extended by org.mule.util.queue.DefaultQueueStoreDelegate
All Implemented Interfaces:
QueueStoreDelegate

public class DefaultQueueStoreDelegate
extends AbstractQueueStoreDelegate

The default QueueStoreDelegate. This uses a LinkedList to store the members of the queue.


Constructor Summary
DefaultQueueStoreDelegate(int capacity)
           
 
Method Summary
protected  void add(Serializable o)
          Adds an item at the end of the queue
protected  void addFirst(Serializable item)
          Adds an object at the beginning of the queue
 void dispose()
          Deletes the queue and it's content.
protected  boolean doAddAll(Collection<? extends Serializable> items)
          Adds all the items at the end of the queue
protected  void doClear()
          Removes all the items in the queue
protected  Serializable getFirst()
          reads the first element in the queue
protected  boolean isEmpty()
           
protected  Serializable removeFirst()
          removes the first element in the queue
 int size()
           
 
Methods inherited from class org.mule.util.queue.AbstractQueueStoreDelegate
addAll, clear, getSize, offer, peek, poll, putNow, untake
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultQueueStoreDelegate

public DefaultQueueStoreDelegate(int capacity)
Method Detail

add

protected void add(Serializable o)
Description copied from class: AbstractQueueStoreDelegate
Adds an item at the end of the queue

Specified by:
add in class AbstractQueueStoreDelegate
Parameters:
o - object to add

removeFirst

protected Serializable removeFirst()
Description copied from class: AbstractQueueStoreDelegate
removes the first element in the queue

Specified by:
removeFirst in class AbstractQueueStoreDelegate
Returns:
the first element in the queue

isEmpty

protected boolean isEmpty()
Specified by:
isEmpty in class AbstractQueueStoreDelegate
Returns:
true if the queue is empty, false otherwise

getFirst

protected Serializable getFirst()
Description copied from class: AbstractQueueStoreDelegate
reads the first element in the queue

Specified by:
getFirst in class AbstractQueueStoreDelegate
Returns:
the fist element in the queue

addFirst

protected void addFirst(Serializable item)
Description copied from class: AbstractQueueStoreDelegate
Adds an object at the beginning of the queue

Specified by:
addFirst in class AbstractQueueStoreDelegate
Parameters:
item - object to add

doClear

protected void doClear()
Description copied from class: AbstractQueueStoreDelegate
Removes all the items in the queue

Specified by:
doClear in class AbstractQueueStoreDelegate

size

public int size()
Specified by:
size in class AbstractQueueStoreDelegate
Returns:
the number of elements in the queue

doAddAll

protected boolean doAddAll(Collection<? extends Serializable> items)
Description copied from class: AbstractQueueStoreDelegate
Adds all the items at the end of the queue

Specified by:
doAddAll in class AbstractQueueStoreDelegate
Parameters:
items - objects to add
Returns:
true if it were able to add them all, false otherwise

dispose

public void dispose()
Description copied from interface: QueueStoreDelegate
Deletes the queue and it's content.



Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.