public class ZeroBuffer
This is used to create a zero-buffered object channel that never loses data.
The getState method will return FULL if there is an output waiting on the channel and EMPTY if there is not.
Type | Name and description |
---|---|
Object |
clone() Returns a new (and EMPTY) ZeroBuffer with the same creation parameters as this one. |
void |
endGet() Ends the extended rendezvous by clearing the buffer. |
Object |
get() Returns the Object from the ZeroBuffer. |
int |
getState() Returns the current state of the ZeroBuffer. |
void |
put(Object value) Puts a new Object into the ZeroBuffer. |
void |
removeAll() |
Object |
startGet() Begins an extended rendezvous - simply returns the next object in the buffer. |
Returns a new (and EMPTY) ZeroBuffer with the same creation parameters as this one.
Note: Only the size and structure of the ZeroBuffer is cloned, not any stored data.
Ends the extended rendezvous by clearing the buffer.
Returns the Object from the ZeroBuffer.
Pre-condition: getState must not currently return EMPTY.
Returns the current state of the ZeroBuffer.
Puts a new Object into the ZeroBuffer.
Pre-condition: getState must not currently return FULL.
value
- the Object to put into the ZeroBufferBegins an extended rendezvous - simply returns the next object in the buffer. This function does not remove the object. Pre-condition: getState must not currently return EMPTY.