com.ericsson.research.trap.spi.TrapMessageBuffer |
Known Indirect Subclasses |
A TrapMessageBuffer is a circular buffer with reordering capabilities for TrapMessage
objects. Messages are
inserted using put() in any random order, and accessed using fetch() in sequential order.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Accessor for the number of objects available for reading.
| |||||||||||
Fetches the next available message.
| |||||||||||
Inserts a message into the buffer.
|
Accessor for the number of objects available for reading.
Fetches the next available message. For performance reasons, this method requires a target to fetch into. This is an atomic operation. The fetched object is removed from the buffer
target | The target object to fetch into. The m and t properties will be overwritten. |
---|
Inserts a message into the buffer. The insertion is such that it is in the correct order in the buffer as per the message ID. Multiple invocations for the same message ID are discarded silently.
m | The message to insert. |
---|---|
t | The transport it was transported on. |
IllegalArgumentException | If the message doesn't fit in the buffer. |
---|