org.mule.util.queue
Class DefaultQueueStore

java.lang.Object
  extended by org.mule.util.queue.DefaultQueueStore
All Implemented Interfaces:
QueueStore, RecoverableQueueStore

public class DefaultQueueStore
extends Object
implements RecoverableQueueStore

Internal queue implementation that will execute operations directly to the queue storage. Stores information about a Queue


Constructor Summary
DefaultQueueStore(String name, MuleContext muleContext, QueueConfiguration config)
           
 
Method Summary
 void clear()
           
 void close()
           
 boolean contains(Serializable value)
          Checks if a certain object exists in the queue.
 void dispose()
           
 boolean equals(Object obj)
           
 int getCapacity()
           
 String getName()
           
 int getSize()
           
 int hashCode()
           
 boolean isPersistent()
           
 boolean offer(Serializable o, int room, long timeout)
           
 Serializable peek()
           
 Serializable poll(long timeout)
           
 void putNow(Serializable o)
           
 void remove(Serializable value)
          Removes the value from the queue.
 void setConfig(QueueConfiguration config)
           
 void untake(Serializable item)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultQueueStore

public DefaultQueueStore(String name,
                         MuleContext muleContext,
                         QueueConfiguration config)
Method Detail

setConfig

public void setConfig(QueueConfiguration config)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getName

public String getName()
Specified by:
getName in interface QueueStore

hashCode

public int hashCode()
Overrides:
hashCode in class Object

putNow

public void putNow(Serializable o)
Specified by:
putNow in interface QueueStore

offer

public boolean offer(Serializable o,
                     int room,
                     long timeout)
              throws InterruptedException
Specified by:
offer in interface QueueStore
Throws:
InterruptedException

poll

public Serializable poll(long timeout)
                  throws InterruptedException
Specified by:
poll in interface QueueStore
Throws:
InterruptedException

peek

public Serializable peek()
                  throws InterruptedException
Specified by:
peek in interface QueueStore
Throws:
InterruptedException

untake

public void untake(Serializable item)
            throws InterruptedException
Specified by:
untake in interface QueueStore
Throws:
InterruptedException

getSize

public int getSize()
Specified by:
getSize in interface QueueStore

clear

public void clear()
           throws InterruptedException
Specified by:
clear in interface QueueStore
Throws:
InterruptedException

dispose

public void dispose()
Specified by:
dispose in interface QueueStore

getCapacity

public int getCapacity()
Specified by:
getCapacity in interface QueueStore

remove

public void remove(Serializable value)
Description copied from interface: RecoverableQueueStore
Removes the value from the queue.

Specified by:
remove in interface RecoverableQueueStore
Parameters:
value - object to be removed

contains

public boolean contains(Serializable value)
Description copied from interface: RecoverableQueueStore
Checks if a certain object exists in the queue.

Specified by:
contains in interface RecoverableQueueStore
Parameters:
value - object to search in the queue
Returns:
true if contains the object, false otherwise.

close

public void close()
Specified by:
close in interface QueueStore

isPersistent

public boolean isPersistent()
Specified by:
isPersistent in interface QueueStore


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