|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A KeyedBuffer is a low level hybrid FIFO Queue and Keyed map Each MessageExchange implementation will create at least two KeyedBuffer's, one for messages being sent, and another for messages that have been received. KeyedBuffers differ from traditional FIFO Queues in that elements put in are keyed and can be taken out of order. Different implementations may allow for variations on how the KeyedBuffer model is implemented. For instance, the code will ship with a NonPersistentKeyedBuffer that will store all contained objects in memory. The fact that everything is stored in memory means that the buffer is not fault tolerant. If fault tolerance is required, then a Persistent KeyedBuffer must be created that persists the objects somehow.
Method Summary | |
java.lang.Object |
cancel(java.lang.Object key)
Cancel a message that has been put on the channel. |
java.lang.Object |
get()
Select and remove the next object in the buffer (does not wait for a message to be put into the buffer) |
java.lang.Object |
get(java.lang.Object key)
Select and remove the specified object in the buffer (does not wait for a message to be put into the buffer) |
java.lang.Object |
peek()
Select, but do not remove the next message on the channel. |
java.lang.Object[] |
peekAll()
Select, but do not remove all messages on the channel. |
void |
put(java.lang.Object key,
java.lang.Object context)
Put a message onto the channel |
java.lang.Object |
select()
Select and remove the next message in the channel If a message is not available, wait indefinitely for one |
java.lang.Object |
select(long timeout)
Select and remove the next message in the channel If a message is not available, wait the specified amount of time for one |
java.lang.Object |
select(java.lang.Object key)
Select and remove a specific message in the channel If the message is not available, wait indefinitely for one to be available |
java.lang.Object |
select(java.lang.Object key,
long timeout)
Select and remove a specific message in the channel If the message is not available, wait the specified amount of time for one |
java.lang.Object[] |
selectAll()
Select and remove all of the messages currently in the channel (useful for bulk operations). |
Method Detail |
public java.lang.Object peek()
public java.lang.Object[] peekAll()
public void put(java.lang.Object key, java.lang.Object context)
public java.lang.Object cancel(java.lang.Object key)
public java.lang.Object[] selectAll()
public java.lang.Object select() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object select(long timeout) throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object select(java.lang.Object key) throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object select(java.lang.Object key, long timeout) throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object get()
public java.lang.Object get(java.lang.Object key)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |