org.apache.activemq.memory.list
Class DestinationBasedMessageList

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

public class DestinationBasedMessageList
extends Object
implements MessageList

An implementation of MessageList which maintains a separate message list for each destination to reduce contention on the list and to speed up recovery times by only recovering the interested topics.


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

Constructor Detail

DestinationBasedMessageList

public DestinationBasedMessageList(int maximumSize)

DestinationBasedMessageList

public DestinationBasedMessageList(MessageBuffer buffer)
Method Detail

add

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

getMessages

public List<MessageReference> getMessages(Subscription sub)

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

clear

public void clear()
Specified by:
clear in interface MessageList


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.