public class BlackHoleBuffer<T> extends ChannelValueStore<T>
The getState method will return EMPTY if the Channel does not contain an Object and FULL if it does.
EMPTY, FULL, NONEMPTYFULL| Constructor and Description |
|---|
BlackHoleBuffer() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
clone()
Returns a new Object with the same creation parameters as this Object.
|
protected T |
get()
Returns the Object from the ZeroBuffer.
|
protected int |
getState()
Returns the current state of the ZeroBuffer, should be called to ensure the
Pre-conditions of the other methods are not broken.
|
protected void |
put(T value)
Puts a new Object into the ZeroBuffer.
|
protected Object clone()
clone in class ChannelValueStore<T>protected T get()
NOTE: getState should be called before this method to check that the state is not EMPTY. If the state is EMPTY the ZeroBuffer will be left in an undefined state.
Pre-condition: The state must not be EMPTY
get in class ChannelValueStore<T>protected int getState()
getState in class ChannelValueStore<T>protected void put(T value)
NOTE: getState should be called before this method to check that the state is not FULL. If the state is FULL the ZeroBuffer will be left in an undefined state.
Pre-condition: The state must not be FULL
put in class ChannelValueStore<T>value - The object to put in the ChannelValueStoreCopyright © 2015 Revolution Systems Inc.. All rights reserved.