cz.cuni.amis.utils.flag
Interface IReasonFlag<TYPE,REASON>

Package class diagram package IReasonFlag
All Superinterfaces:
IFlag<TYPE>, Serializable
All Known Implementing Classes:
ImmutableReasonFlag, ReasonFlag

public interface IReasonFlag<TYPE,REASON>
extends IFlag<TYPE>, Serializable

Allows you to pass reasons of flag change along with new value of the flag.

Note that implementation must be Serializable

Author:
ik

Method Summary
 void setFlag(TYPE newValue, REASON reasonForChange)
          Changes the flag and informs all listeners.
 
Methods inherited from interface cz.cuni.amis.utils.flag.IFlag
addListener, addStrongListener, clearListeners, defreeze, freeze, getFlag, getImmutable, inSync, isFrozen, isListenning, removeAllListeners, removeListener, setFlag
 

Method Detail

setFlag

void setFlag(TYPE newValue,
             REASON reasonForChange)
Changes the flag and informs all listeners.

Should not produce any dead-locks even though it is synchronized method.

Parameters:
newValue -
Throws:
InterruptedRuntimeException - if interrupted during the await on the freeze latch


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.