org.apache.activemq.memory.list
Class SimpleMessageList
java.lang.Object
org.apache.activemq.memory.list.SimpleMessageList
- All Implemented Interfaces:
- MessageList
public class SimpleMessageList
- extends java.lang.Object
- implements MessageList
A simple fixed size MessageList
where there is a single, fixed size
list that all messages are added to for simplicity. Though this will lead to
possibly slow recovery times as many more messages than is necessary will
have to be iterated through for each subscription.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleMessageList
public SimpleMessageList()
SimpleMessageList
public SimpleMessageList(int maximumSize)
add
public void add(MessageReference node)
- Specified by:
add
in interface MessageList
getMessages
public java.util.List<MessageReference> getMessages(ActiveMQDestination destination)
- Description copied from interface:
MessageList
- Returns the current list of MessageReference objects for the given subscription
- Specified by:
getMessages
in interface MessageList
browse
public Message[] browse(ActiveMQDestination destination)
- Specified by:
browse
in interface MessageList
- Returns:
- an array of Messages that match the destination
getList
public java.util.List<MessageReference> getList()
- Returns a copy of the list
getSize
public int getSize()
clear
public void clear()
- Specified by:
clear
in interface MessageList
Copyright © 2005-2015. All Rights Reserved.