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
- 
- 
Field SummaryFields Modifier and Type Field Description protected StringpropertyName
 - 
Constructor SummaryConstructors Constructor Description UniquePropertyMessageEvictionStrategy()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageReference[]evictMessages(LinkedList messages)Find the message reference in the given list with oldest messages at the front and newer messages at the endStringgetPropertyName()voidsetPropertyName(String propertyName)- 
Methods inherited from class org.apache.activemq.broker.region.policy.MessageEvictionStrategySupportgetEvictExpiredMessagesHighWatermark, setEvictExpiredMessagesHighWatermark
 
- 
 
- 
- 
- 
Field Detail- 
propertyNameprotected String propertyName 
 
- 
 - 
Method Detail- 
getPropertyNamepublic String getPropertyName() 
 - 
setPropertyNamepublic void setPropertyName(String propertyName) 
 - 
evictMessagespublic MessageReference[] evictMessages(LinkedList messages) throws IOException Description copied from interface:MessageEvictionStrategyFind 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:
- 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).
 
 
- 
 
-