com.caucho.jms.memory
Class MemoryQueueImpl<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<E>
          extended by com.caucho.jms.queue.AbstractDestination<E>
              extended by com.caucho.jms.queue.AbstractQueue<E>
                  extended by com.caucho.jms.queue.AbstractMemoryQueue<E,MemoryQueueEntry<E>>
                      extended by com.caucho.jms.memory.MemoryQueueImpl<E>
All Implemented Interfaces:
HandleAware, MessageQueue<E>, java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.concurrent.BlockingQueue<E>, java.util.Queue<E>, Destination
Direct Known Subclasses:
FileSubscriberQueue, MemoryQueue, MemoryQueue, MemorySubscriberQueue

public class MemoryQueueImpl<E>
extends AbstractMemoryQueue<E,MemoryQueueEntry<E>>

Implements a memory queue.

See Also:
Serialized Form

Constructor Summary
MemoryQueueImpl()
           
 
Method Summary
protected  void acknowledge(MemoryQueueEntry<E> entry)
           
 java.lang.String getUrl()
          Returns the configuration URL.
 MemoryQueueEntry<E> writeEntry(java.lang.String msgId, E payload, int priority, long expireTime)
          Adds the message to the persistent store.
 
Methods inherited from class com.caucho.jms.queue.AbstractMemoryQueue
acknowledge, addMessageCallback, addQueueEntry, dispatchMessage, getBrowserList, getConsumerCount, getMessageIds, getQueueSize, getQueueSizeMax, getReceiverCount, hasMessage, listen, readEntry, readEntry, readPayload, receive, receiveEntry, receiveEntry, removeEntry, removeMessageCallback, rollback, send, setQueueSizeMax
 
Methods inherited from class com.caucho.jms.queue.AbstractQueue
addListenerException, close, drainTo, drainTo, getListenerFailCountTotal, getListenerFailLastTime, init, iterator, offer, offer, peek, poll, poll, postConstruct, put, receive, receive, remainingCapacity, setQueueName, size, take
 
Methods inherited from class com.caucho.jms.queue.AbstractDestination
generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getTopicName, setName, setSerializationHandle, toString
 
Methods inherited from class java.util.AbstractQueue
add, addAll, clear, element, remove
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Queue
getQueueName, toString
 
Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains, remove
 
Methods inherited from interface java.util.Queue
element, remove
 
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray
 

Constructor Detail

MemoryQueueImpl

public MemoryQueueImpl()
Method Detail

getUrl

public java.lang.String getUrl()
Returns the configuration URL.

Overrides:
getUrl in class AbstractDestination<E>

writeEntry

public MemoryQueueEntry<E> writeEntry(java.lang.String msgId,
                                      E payload,
                                      int priority,
                                      long expireTime)
Adds the message to the persistent store. Called if there are no active listeners.

Specified by:
writeEntry in class AbstractMemoryQueue<E,MemoryQueueEntry<E>>

acknowledge

protected void acknowledge(MemoryQueueEntry<E> entry)
Overrides:
acknowledge in class AbstractMemoryQueue<E,MemoryQueueEntry<E>>