Class OrderBasedMessageBuffer
- java.lang.Object
-
- org.apache.activemq.memory.buffer.OrderBasedMessageBuffer
-
- All Implemented Interfaces:
MessageBuffer
public class OrderBasedMessageBuffer extends Object implements MessageBuffer
AMessageBuffer
which evicts messages in arrival order so the oldest messages are removed first.
-
-
Constructor Summary
Constructors Constructor Description OrderBasedMessageBuffer()
OrderBasedMessageBuffer(int limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
MessageQueue
createMessageQueue()
Creates a new message queue instanceint
getSize()
void
onSizeChanged(MessageQueue queue, int delta, int queueSize)
After a message queue has changed we may need to perform some evictions
-
-
-
Method Detail
-
getSize
public int getSize()
- Specified by:
getSize
in interfaceMessageBuffer
-
createMessageQueue
public MessageQueue createMessageQueue()
Creates a new message queue instance- Specified by:
createMessageQueue
in interfaceMessageBuffer
-
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 interfaceMessageBuffer
- Parameters:
delta
-queueSize
-
-
clear
public void clear()
- Specified by:
clear
in interfaceMessageBuffer
-
-