org.apache.activemq.memory.buffer
Class OrderBasedMessageBuffer

java.lang.Object
  extended by org.apache.activemq.memory.buffer.OrderBasedMessageBuffer
All Implemented Interfaces:
MessageBuffer

public class OrderBasedMessageBuffer
extends Object
implements MessageBuffer

A MessageBuffer which evicts messages in arrival order so the oldest messages are removed first.


Constructor Summary
OrderBasedMessageBuffer()
           
OrderBasedMessageBuffer(int limit)
           
 
Method Summary
 void clear()
           
 MessageQueue createMessageQueue()
          Creates a new message queue instance
 int getSize()
           
 void onSizeChanged(MessageQueue queue, int delta, int queueSize)
          After a message queue has changed we may need to perform some evictions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderBasedMessageBuffer

public OrderBasedMessageBuffer()

OrderBasedMessageBuffer

public OrderBasedMessageBuffer(int limit)
Method Detail

getSize

public int getSize()
Specified by:
getSize in interface MessageBuffer

createMessageQueue

public MessageQueue createMessageQueue()
Creates a new message queue instance

Specified by:
createMessageQueue in interface MessageBuffer

onSizeChanged

public void onSizeChanged(MessageQueue queue,
                          int delta,
                          int queueSize)
After a message queue has changed we may need to perform some evictions

Specified by:
onSizeChanged in interface MessageBuffer
Parameters:
delta -
queueSize -

clear

public void clear()
Specified by:
clear in interface MessageBuffer


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