com.ibm.dse.cs.servlet
Class Buffer
java.lang.Object
|
+--com.ibm.dse.cs.servlet.Buffer
- Direct Known Subclasses:
- NotificationEventsBuffer, SendEventsBuffer
- public abstract class Buffer
- extends java.lang.Object
The Buffer abstract class encapsulates a buffer to store and retrieve information.
Method Summary |
abstract java.lang.Object |
calculateValueToAdd(java.lang.Object oldValue,
java.lang.Object newValue)
Adds the second parameter to the first parameter and returns it. |
java.lang.Object |
getAndRemove(java.lang.Object key)
Returns the value to which the specified key is mapped in this buffer. |
java.lang.Object |
getAndRemoveWithTimeout(java.lang.Object key,
long timeout)
Returns the value to which the specified key is mapped in this buffer. |
void |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value in this buffer. |
void |
putAndSignalOn(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value in this buffer and
wakes up a single thread that is waiting on this object's monitor. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Buffer
public Buffer()
calculateValueToAdd
public abstract java.lang.Object calculateValueToAdd(java.lang.Object oldValue,
java.lang.Object newValue)
- Adds the second parameter to the first parameter and returns it.
- Parameters:
oldValue
- java.lang.ObjectnewValue
- java.lang.Object- Returns:
- java.lang.Object
getAndRemove
public java.lang.Object getAndRemove(java.lang.Object key)
- Returns the value to which the specified key is mapped in this buffer.
If the key is not mapped to any value waits.
- Parameters:
key
- java.lang.Object- Returns:
- java.lang.Object
getAndRemoveWithTimeout
public java.lang.Object getAndRemoveWithTimeout(java.lang.Object key,
long timeout)
- Returns the value to which the specified key is mapped in this buffer.
If the key is not mapped to any value waits with a timeout.
- Parameters:
key
- java.lang.Object- Returns:
- java.lang.Object
put
public void put(java.lang.Object key,
java.lang.Object value)
- Maps the specified key to the specified value in this buffer.
- Parameters:
key
- java.lang.Objectvalue
- java.lang.Object
putAndSignalOn
public void putAndSignalOn(java.lang.Object key,
java.lang.Object value)
- Maps the specified key to the specified value in this buffer and
wakes up a single thread that is waiting on this object's monitor.
- Parameters:
key
- java.lang.Objectvalue
- java.lang.Object