cz.cuni.amis.utils.flag
Class FlagInteger
java.lang.Object
cz.cuni.amis.utils.flag.Flag<Integer>
cz.cuni.amis.utils.flag.FlagInteger
- All Implemented Interfaces:
- IFlag<Integer>, Serializable
public class FlagInteger
- extends Flag<Integer>
- implements Serializable
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.
- Author:
- Jimmy
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class cz.cuni.amis.utils.flag.Flag |
Flag.DoInSync<T> |
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 |
FlagInteger
public FlagInteger()
FlagInteger
public FlagInteger(Integer initial)
increment
public void increment(int number)
decrement
public void decrement(int number)
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.