Class OldestMessageWithLowestPriorityEvictionStrategy
- java.lang.Object
-
- org.apache.activemq.broker.region.policy.MessageEvictionStrategySupport
-
- org.apache.activemq.broker.region.policy.OldestMessageWithLowestPriorityEvictionStrategy
-
- All Implemented Interfaces:
MessageEvictionStrategy
public class OldestMessageWithLowestPriorityEvictionStrategy extends MessageEvictionStrategySupport
An eviction strategy which evicts the oldest message with the lowest priority first.
-
-
Constructor Summary
Constructors Constructor Description OldestMessageWithLowestPriorityEvictionStrategy()
-
Method Summary
All 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 end-
Methods inherited from class org.apache.activemq.broker.region.policy.MessageEvictionStrategySupport
getEvictExpiredMessagesHighWatermark, setEvictExpiredMessagesHighWatermark
-
-
-
-
Method Detail
-
evictMessages
public MessageReference[] evictMessages(LinkedList messages) throws 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:
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).
-
-