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:
VolatileBooleanHolder
,
Serialized Form
Method Summary |
boolean |
getValue()
gets the value of the wrapped boolean |
void |
setValue(boolean b)
sets the value of the wrapped boolean |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SynchronizedBooleanHolder
public SynchronizedBooleanHolder()
getValue
public boolean getValue()
- Description copied from interface:
ThreadSafeBooleanHolder
- gets the value of the wrapped boolean
- Specified by:
getValue
in interface ThreadSafeBooleanHolder
setValue
public void setValue(boolean b)
- Description copied from interface:
ThreadSafeBooleanHolder
- sets the value of the wrapped boolean
- Specified by:
setValue
in interface ThreadSafeBooleanHolder