org.apache.activemq.broker.region.policy
Class UniquePropertyMessageEvictionStrategy
java.lang.Object
org.apache.activemq.broker.region.policy.MessageEvictionStrategySupport
org.apache.activemq.broker.region.policy.UniquePropertyMessageEvictionStrategy
- All Implemented Interfaces:
- MessageEvictionStrategy
public class UniquePropertyMessageEvictionStrategy
- extends MessageEvictionStrategySupport
An eviction strategy which evicts the oldest message within messages with the same property value
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
propertyName
protected java.lang.String propertyName
UniquePropertyMessageEvictionStrategy
public UniquePropertyMessageEvictionStrategy()
getPropertyName
public java.lang.String getPropertyName()
setPropertyName
public void setPropertyName(java.lang.String propertyName)
evictMessages
public MessageReference[] evictMessages(java.util.LinkedList messages)
throws java.io.IOException
- Description copied from interface:
MessageEvictionStrategy
- Find the message reference in the given list with oldest messages at the front and newer messages at the end
- Returns:
- the message that has been evicted.
- Throws:
java.io.IOException
- if an exception occurs such as reading a message content (but should not ever happen
as usually all the messages will be in RAM when this method is called).
Copyright © 2005-2015. All Rights Reserved.