|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.utils.flag.Flag<java.lang.Integer> cz.cuni.amis.utils.flag.FlagInteger
public class FlagInteger
This class is cruicial in order to have synchronized increments on the integer flag.
The .setFlag() mechanism is very complex and it is sometimes not viable to do .setFlag() call inside synchronized statements (deadlocks!) therefore we have to solve it inside the class.
Nested Class Summary | |
---|---|
static class |
FlagInteger.DoInSyncWithReason<T,R>
This class extends the DoInSync of the reason that was passed along. |
Nested classes/interfaces inherited from class cz.cuni.amis.utils.flag.Flag |
---|
Flag.DoInSync<T> |
Constructor Summary | |
---|---|
FlagInteger(java.lang.Integer initial)
|
Method Summary | |
---|---|
void |
decrement(int number)
|
void |
increment(int number)
|
Methods inherited from class cz.cuni.amis.utils.flag.Flag |
---|
addListener, addStrongListener, clearListeners, defreeze, freeze, getFlag, getImmutable, inSync, inSyncInner, isFrozen, isListenning, isNone, isOne, removeAllListeners, removeListener, setFlag, waitFor, waitFor, waitForChange, waitForChange |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlagInteger(java.lang.Integer initial)
Method Detail |
---|
public void increment(int number)
public void decrement(int number)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |