IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.event
Class Buffer

java.lang.Object
  extended bycom.ibm.btt.event.Buffer
Direct Known Subclasses:
NotificationEventsBuffer

public abstract class Buffer
extends java.lang.Object

Buffer abstract class encapsulates a buffer to store and retrieve information.


Constructor Summary
Buffer()
           
 
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
 

Constructor Detail

Buffer

public Buffer()
Method Detail

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.Object
newValue - 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 it 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 it waits with a timeout.

Parameters:
key - java.lang.Object
timeout - long
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.Object
value - 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.Object
value - java.lang.Object

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005