org.apache.activemq.broker.region.policy
Interface MessageEvictionStrategy

All Known Implementing Classes:
MessageEvictionStrategySupport, OldestMessageEvictionStrategy, OldestMessageWithLowestPriorityEvictionStrategy, UniquePropertyMessageEvictionStrategy

public interface MessageEvictionStrategy

A strategy for evicting messages from slow consumers.


Method Summary
 MessageReference[] evictMessages(LinkedList messages)
          Find the message reference in the given list with oldest messages at the front and newer messages at the end
 int getEvictExpiredMessagesHighWatermark()
          REturns the high water mark on which we will eagerly evict expired messages from RAM
 

Method Detail

evictMessages

MessageReference[] evictMessages(LinkedList messages)
                                 throws IOException
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).

getEvictExpiredMessagesHighWatermark

int getEvictExpiredMessagesHighWatermark()
REturns the high water mark on which we will eagerly evict expired messages from RAM



Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.