|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ajanta.pattern.Counter
It is a Synchronizer for SplitJoinAll and SpliJoinAny object. It is a simple counter implementing a barrier.
SplitJoinAll,
SplitJoinAny,
Serialized Form| Constructor Summary | |
Counter()
|
|
| Method Summary | |
void |
decrement()
It decrements the value of the counter and if the value of the counter is not zero then it makes caller to execute wait() call else it notifyAll(). |
void |
setValue(int v)
Sets the value of the counter to the value passed as argument |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Counter()
| Method Detail |
public void setValue(int v)
v - initial value of the counterpublic void decrement()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||