public class ZeroBufferInt
This is used to create a zero-buffered integer 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) ZeroBufferInt with the same creation parameters as this one. |
void |
endGet() Ends the extended rendezvous by clearing the buffer. |
int |
get() Returns the int from the ZeroBufferInt. |
int |
getState() Returns the current state of the ZeroBufferInt. |
void |
put(int value) Puts a new int into the ZeroBufferInt. |
void |
removeAll() |
int |
startGet() Begins an extended rendezvous - simply returns the next integer in the buffer. |
Returns a new (and EMPTY) ZeroBufferInt with the same creation parameters as this one.
Note: Only the size and structure of the ZeroBufferInt is cloned, not any stored data.
Ends the extended rendezvous by clearing the buffer.
Returns the int from the ZeroBufferInt.
Pre-condition: getState must not currently return EMPTY.
Returns the current state of the ZeroBufferInt.
Puts a new int into the ZeroBufferInt.
Pre-condition: getState must not currently return FULL.
value
- the int to put into the ZeroBufferIntBegins an extended rendezvous - simply returns the next integer in the buffer. This function does not remove the integer. Pre-condition: getState must not currently return EMPTY.