Class DecayingBooleanImpl
java.lang.Object
com.atlassian.bamboo.utils.concurrent.DecayingBooleanImpl
- All Implemented Interfaces:
DecayingBoolean
A boolean that decays to its initial state after a defined period passed since the last use.
-
Constructor Summary
ConstructorsConstructorDescriptionDecayingBooleanImpl(boolean initialValue, boolean decayValue, Duration ttl) DecayingBooleanImpl(boolean initialValue, Duration ttl) -
Method Summary
Modifier and TypeMethodDescriptionbooleancompareAndSet(boolean expect, boolean update) booleanget()voidset(boolean b)
-
Constructor Details
-
DecayingBooleanImpl
-
DecayingBooleanImpl
-
-
Method Details
-
get
public boolean get()- Specified by:
getin interfaceDecayingBoolean
-
compareAndSet
public boolean compareAndSet(boolean expect, boolean update) - Specified by:
compareAndSetin interfaceDecayingBoolean
-
set
public void set(boolean b) - Specified by:
setin interfaceDecayingBoolean
-
onDecay
- Specified by:
onDecayin interfaceDecayingBoolean
-