cz.cuni.amis.utils.flag
Class FlagInteger

Package class diagram package FlagInteger
java.lang.Object
  extended by cz.cuni.amis.utils.flag.Flag<Integer>
      extended by 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 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()
           
FlagInteger(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

FlagInteger

public FlagInteger()

FlagInteger

public FlagInteger(Integer initial)
Method Detail

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.