|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KeyedBufferAdd
This interface defines methods that must be implemented by a buffer to allow components to add messages into it, each message being associated with a key. Such an interface is used by producers of messages.
Note: buffer implementations MUST BE thread-safe .
Field Summary | |
---|---|
static String |
ITF_NAME
The commonly used name to refer to an interface with this signature. |
Method Summary | |
---|---|
void |
add(Message message,
Object key)
Adds the specified message to the buffer, associated with the specified key object. |
boolean |
tryAdd(Message message,
Object key)
Adds the specified message to the buffer, associated with the specified key object. |
Field Detail |
---|
static final String ITF_NAME
Method Detail |
---|
void add(Message message, Object key) throws InterruptedException
Buffers may place limitations on what elements may be added to this buffer. In particular, some buffers require that messages contain particular chunks.
message
- the message to be added; never null
.key
- the key that is associated with the message to be added; never
null
.
InterruptedException
- if it is interrupted while waiting for a
message to be removed.BufferAdd.add(Message)
boolean tryAdd(Message message, Object key)
Buffers may place limitations on what elements may be added to this buffer. In particular, some buffers require that messages contain particular chunks.
message
- the message to be added; never null
.key
- the key that is associated with the message to be added; never
null
.
true
if the message has been added.BufferAdd.tryAdd(Message)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |