org.apache.activemq.broker.region.policy
Class OldestMessageWithLowestPriorityEvictionStrategy

java.lang.Object
  extended by org.apache.activemq.broker.region.policy.MessageEvictionStrategySupport
      extended by 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.

Version:
$Revision: 430023 $messageEvictionStrategy

Constructor Summary
OldestMessageWithLowestPriorityEvictionStrategy()
           
 
Method Summary
 MessageReference[] evictMessages(java.util.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldestMessageWithLowestPriorityEvictionStrategy

public OldestMessageWithLowestPriorityEvictionStrategy()
Method Detail

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 © 2011 Apache Software Foundation. All Rights Reserved.