java.lang.Object
com.presumo.jms.plugin.implementation.MemoryMessageQueue
- All Implemented Interfaces:
- com.presumo.jms.plugin.MessageQueue
- public class MemoryMessageQueue
- extends java.lang.Object
- implements com.presumo.jms.plugin.MessageQueue
Implementation of the MessageQueue interface in which all messages
reside in memory. Used by RemoteSession and JmsSession due to some
nasty design shortcuts. Currently also used by Router, but that
will eventually be replaced by an implementation that transactionally
writes persistent messages to disk and leaves non-persistent messages
in memory.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
list
private final java.util.LinkedList list
MemoryMessageQueue
public MemoryMessageQueue()
push
public void push(com.presumo.jms.message.JmsMessage msg)
throws java.io.IOException
- Specified by:
push in interface com.presumo.jms.plugin.MessageQueue
push
public void push(com.presumo.jms.message.JmsMessage[] msgs)
throws java.io.IOException
- Specified by:
push in interface com.presumo.jms.plugin.MessageQueue
getNext
public com.presumo.jms.message.JmsMessage getNext()
throws java.io.IOException
- Specified by:
getNext in interface com.presumo.jms.plugin.MessageQueue
getNext
public com.presumo.jms.message.JmsMessage[] getNext(int batchsize)
throws java.io.IOException
- Specified by:
getNext in interface com.presumo.jms.plugin.MessageQueue
delete
public void delete(java.lang.String key)
throws java.io.IOException
- Specified by:
delete in interface com.presumo.jms.plugin.MessageQueue
delete
public void delete(java.lang.String[] keys)
throws java.io.IOException
- Specified by:
delete in interface com.presumo.jms.plugin.MessageQueue
size
public int size()
- Specified by:
size in interface com.presumo.jms.plugin.MessageQueue
close
public void close()
throws java.io.IOException
- Specified by:
close in interface com.presumo.jms.plugin.MessageQueue
isPersistent
public boolean isPersistent()
- Description copied from interface:
com.presumo.jms.plugin.MessageQueue
- Implementations must implement this method in order to indicate if
the given message queue stores persistent message in non-volatile
storage.
- Specified by:
isPersistent in interface com.presumo.jms.plugin.MessageQueue