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
-
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
-
Semaphore()
-
-
decr()
-
-
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
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
Semaphore
public Semaphore()
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
decr
public synchronized SuperTuple decr()
All Packages Class Hierarchy This Package Previous Next Index