Class OrderBasedMessageBuffer
java.lang.Object
org.apache.activemq.memory.buffer.OrderBasedMessageBuffer
- All Implemented Interfaces:
MessageBuffer
A
MessageBuffer
which evicts messages in arrival order so the oldest
messages are removed first.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
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
-
Constructor Details
-
OrderBasedMessageBuffer
public OrderBasedMessageBuffer() -
OrderBasedMessageBuffer
public OrderBasedMessageBuffer(int limit)
-
-
Method Details
-
getSize
public int getSize()- Specified by:
getSize
in interfaceMessageBuffer
-
createMessageQueue
Creates a new message queue instance- Specified by:
createMessageQueue
in interfaceMessageBuffer
-
onSizeChanged
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
-