org.apache.activemq.memory.list
Class SimpleMessageList

java.lang.Object
  extended by org.apache.activemq.memory.list.SimpleMessageList
All Implemented Interfaces:
MessageList

public class SimpleMessageList
extends 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.


Constructor Summary
SimpleMessageList()
           
SimpleMessageList(int maximumSize)
           
 
Method Summary
 void add(MessageReference node)
           
 Message[] browse(ActiveMQDestination destination)
           
 void clear()
           
 List<MessageReference> getList()
          Returns a copy of the list
 List<MessageReference> getMessages(ActiveMQDestination destination)
          Returns the current list of MessageReference objects for the given subscription
 int getSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMessageList

public SimpleMessageList()

SimpleMessageList

public SimpleMessageList(int maximumSize)
Method Detail

add

public void add(MessageReference node)
Specified by:
add in interface MessageList

getMessages

public 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 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–2013 The Apache Software Foundation. All rights reserved.