Package org.apache.activemq.memory.list
Class DestinationBasedMessageList
java.lang.Object
org.apache.activemq.memory.list.DestinationBasedMessageList
- All Implemented Interfaces:
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.apache.activemq.broker.region.MessageReference node) org.apache.activemq.command.Message[]browse(org.apache.activemq.command.ActiveMQDestination destination) voidclear()List<org.apache.activemq.broker.region.MessageReference>getMessages(Subscription sub) List<org.apache.activemq.broker.region.MessageReference>getMessages(org.apache.activemq.command.ActiveMQDestination destination) Returns the current list of MessageReference objects for the given subscription
-
Constructor Details
-
DestinationBasedMessageList
public DestinationBasedMessageList(int maximumSize) -
DestinationBasedMessageList
-
-
Method Details
-
add
public void add(org.apache.activemq.broker.region.MessageReference node) - Specified by:
addin interfaceMessageList
-
getMessages
-
getMessages
public List<org.apache.activemq.broker.region.MessageReference> getMessages(org.apache.activemq.command.ActiveMQDestination destination) Description copied from interface:MessageListReturns the current list of MessageReference objects for the given subscription- Specified by:
getMessagesin interfaceMessageList
-
browse
public org.apache.activemq.command.Message[] browse(org.apache.activemq.command.ActiveMQDestination destination) - Specified by:
browsein interfaceMessageList- Returns:
- an array of Messages that match the destination
-
clear
public void clear()- Specified by:
clearin interfaceMessageList
-