All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.tspaces.Semaphore

java.lang.Object
   |
   +----com.ibm.tspaces.Semaphore

public class Semaphore
extends Object
implements Serializable
Class semaphore is a simple counting semaphore; be careful not to use it when already in a synchronized method. Although semaphore uses wait, I don't think that recusively releases all locks on classes that are on the stack

Author:
Pete Wyckoff

Variable Index

 o setUsed
decrement the semaphore, make sure your code is able to call this method --- wherever you call decr from had better not be holding locks that are needed for the other part to call incr

Constructor Index

 o Semaphore()

Method Index

 o decr()
 o incr(SuperTuple)
increment the semaphore, make sure your code is able to call this method --- wherever you call decr from had better not be holding locks that are needed for the other part to call incr

Variables

 o setUsed
 public boolean setUsed
decrement the semaphore, make sure your code is able to call this method --- wherever you call decr from had better not be holding locks that are needed for the other part to call incr

Constructors

 o Semaphore
 public Semaphore()

Methods

 o incr
 public synchronized void incr(SuperTuple waitingFor_)
increment the semaphore, make sure your code is able to call this method --- wherever you call decr from had better not be holding locks that are needed for the other part to call incr

 o decr
 public synchronized SuperTuple decr()

All Packages  Class Hierarchy  This Package  Previous  Next  Index