Package com.mchange.v2.holders
Class SynchronizedBooleanHolder
java.lang.Object
com.mchange.v2.holders.SynchronizedBooleanHolder
- All Implemented Interfaces:
ThreadSafeBooleanHolder
,Serializable
public class SynchronizedBooleanHolder
extends Object
implements ThreadSafeBooleanHolder, Serializable
An implementation of ThreadSafeBooleanHolder that
synchronizes on itself for all acesses and mutations
of the underlying boolean.
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SynchronizedBooleanHolder
public SynchronizedBooleanHolder()
-
-
Method Details
-
getValue
public boolean getValue()Description copied from interface:ThreadSafeBooleanHolder
gets the value of the wrapped boolean- Specified by:
getValue
in interfaceThreadSafeBooleanHolder
-
setValue
public void setValue(boolean b) Description copied from interface:ThreadSafeBooleanHolder
sets the value of the wrapped boolean- Specified by:
setValue
in interfaceThreadSafeBooleanHolder
-