Class Atomics
- Since:
- 21.12
- Author:
- Aleks Seovic 2020.12.03
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classExtension toAtomicMarkableReferenceto allow Java serialization.static classExtension toAtomicStampedReferenceto allow Java serialization. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalAtomicBooleanlocalAtomicBoolean(String sName) ReturnLocalAtomicBooleaninstance for the specified name.static LocalAtomicBooleanlocalAtomicBoolean(String sName, boolean fInitialValue) ReturnLocalAtomicBooleaninstance for the specified name and initial value.static LocalAtomicIntegerlocalAtomicInteger(String sName) ReturnLocalAtomicIntegerinstance for the specified name.static LocalAtomicIntegerlocalAtomicInteger(String sName, int nInitialValue) ReturnLocalAtomicIntegerinstance for the specified name and initial value.static LocalAtomicLonglocalAtomicLong(String sName) ReturnLocalAtomicLonginstance for the specified name.static LocalAtomicLonglocalAtomicLong(String sName, long lInitialValue) ReturnLocalAtomicLonginstance for the specified name and initial value.static <V> LocalAtomicMarkableReference<V> ReturnLocalAtomicMarkableReferenceinstance for the specified name.static <V> LocalAtomicMarkableReference<V> localAtomicMarkableReference(String sName, V initialValue, boolean fInitialMark) ReturnLocalAtomicMarkableReferenceinstance for the specified name and initial value and mark.static <V> LocalAtomicReference<V> localAtomicReference(String sName) ReturnLocalAtomicReferenceinstance for the specified name.static <V> LocalAtomicReference<V> localAtomicReference(String sName, V initialValue) ReturnLocalAtomicReferenceinstance for the specified name and initial value.static <V> LocalAtomicStampedReference<V> ReturnLocalAtomicStampedReferenceinstance for the specified name.static <V> LocalAtomicStampedReference<V> localAtomicStampedReference(String sName, V initialValue, int nInitialStamp) ReturnLocalAtomicStampedReferenceinstance for the specified name and initial value and stamp.static RemoteAtomicBooleanremoteAtomicBoolean(String sName) ReturnRemoteAtomicBooleaninstance for the specified name.static RemoteAtomicBooleanremoteAtomicBoolean(String sName, boolean fInitialValue) ReturnRemoteAtomicBooleaninstance for the specified name and initial value.static RemoteAtomicIntegerremoteAtomicInteger(String sName) ReturnRemoteAtomicIntegerinstance for the specified name.static RemoteAtomicIntegerremoteAtomicInteger(String sName, int nInitialValue) ReturnRemoteAtomicIntegerinstance for the specified name and initial value.static RemoteAtomicLongremoteAtomicLong(String sName) ReturnRemoteAtomicLonginstance for the specified name.static RemoteAtomicLongremoteAtomicLong(String sName, long lInitialValue) ReturnRemoteAtomicLonginstance for the specified name and initial value.static <V> RemoteAtomicMarkableReference<V> ReturnRemoteAtomicMarkableReferenceinstance for the specified name.static <V> RemoteAtomicMarkableReference<V> remoteAtomicMarkableReference(String sName, V initialValue, boolean fInitialMark) ReturnRemoteAtomicMarkableReferenceinstance for the specified name and initial value and mark.static <V> RemoteAtomicReference<V> remoteAtomicReference(String sName) ReturnRemoteAtomicReferenceinstance for the specified name.static <V> RemoteAtomicReference<V> remoteAtomicReference(String sName, V initialValue) ReturnRemoteAtomicReferenceinstance for the specified name and initial value.static <V> RemoteAtomicStampedReference<V> ReturnRemoteAtomicStampedReferenceinstance for the specified name.static <V> RemoteAtomicStampedReference<V> remoteAtomicStampedReference(String sName, V initialValue, int nInitialStamp) ReturnRemoteAtomicStampedReferenceinstance for the specified name and initial value and stamp.
-
Field Details
-
SESSION_NAME
The session name.
-
-
Method Details
-
localAtomicBoolean
ReturnLocalAtomicBooleaninstance for the specified name.- Parameters:
sName- the name of the atomic value- Returns:
- a
LocalAtomicBooleaninstance for the specified name
-
localAtomicBoolean
ReturnLocalAtomicBooleaninstance for the specified name and initial value.The initial value will only be set if the atomic value with the specified name does not already exist.
- Parameters:
sName- the name of the atomic valuefInitialValue- the initial value- Returns:
- a
LocalAtomicBooleaninstance for the specified name
-
remoteAtomicBoolean
ReturnRemoteAtomicBooleaninstance for the specified name.- Parameters:
sName- the name of the atomic value- Returns:
- a
RemoteAtomicBooleaninstance for the specified name
-
remoteAtomicBoolean
ReturnRemoteAtomicBooleaninstance for the specified name and initial value.The initial value will only be set if the atomic value with the specified name does not already exist.
- Parameters:
sName- the name of the atomic valuefInitialValue- the initial value- Returns:
- a
RemoteAtomicBooleaninstance for the specified name
-
localAtomicInteger
ReturnLocalAtomicIntegerinstance for the specified name.- Parameters:
sName- the name of the atomic value- Returns:
- a
LocalAtomicIntegerinstance for the specified name
-
localAtomicInteger
ReturnLocalAtomicIntegerinstance for the specified name and initial value.The initial value will only be set if the atomic value with the specified name does not already exist.
- Parameters:
sName- the name of the atomic valuenInitialValue- the initial value- Returns:
- a
LocalAtomicIntegerinstance for the specified name
-
remoteAtomicInteger
ReturnRemoteAtomicIntegerinstance for the specified name.- Parameters:
sName- the name of the atomic value- Returns:
- a
RemoteAtomicIntegerinstance for the specified name
-
remoteAtomicInteger
ReturnRemoteAtomicIntegerinstance for the specified name and initial value.The initial value will only be set if the atomic value with the specified name does not already exist.
- Parameters:
sName- the name of the atomic valuenInitialValue- the initial value- Returns:
- a
RemoteAtomicIntegerinstance for the specified name
-
localAtomicLong
ReturnLocalAtomicLonginstance for the specified name.- Parameters:
sName- the name of the atomic value- Returns:
- a
LocalAtomicLonginstance for the specified name
-
localAtomicLong
ReturnLocalAtomicLonginstance for the specified name and initial value.The initial value will only be set if the atomic value with the specified name does not already exist.
- Parameters:
sName- the name of the atomic valuelInitialValue- the initial value- Returns:
- a
LocalAtomicLonginstance for the specified name
-
remoteAtomicLong
ReturnRemoteAtomicLonginstance for the specified name.- Parameters:
sName- the name of the atomic value- Returns:
- a
RemoteAtomicLonginstance for the specified name
-
remoteAtomicLong
ReturnRemoteAtomicLonginstance for the specified name and initial value.The initial value will only be set if the atomic value with the specified name does not already exist.
- Parameters:
sName- the name of the atomic valuelInitialValue- the initial value- Returns:
- a
RemoteAtomicLonginstance for the specified name
-
localAtomicReference
ReturnLocalAtomicReferenceinstance for the specified name.- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic value- Returns:
- a
LocalAtomicReferenceinstance for the specified name
-
localAtomicReference
ReturnLocalAtomicReferenceinstance for the specified name and initial value.The initial value will only be set if the atomic value with the specified name does not already exist.
- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic valueinitialValue- the initial value- Returns:
- a
LocalAtomicReferenceinstance for the specified name
-
remoteAtomicReference
ReturnRemoteAtomicReferenceinstance for the specified name.- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic value- Returns:
- a
RemoteAtomicReferenceinstance for the specified name
-
remoteAtomicReference
ReturnRemoteAtomicReferenceinstance for the specified name and initial value.The initial value will only be set if the atomic value with the specified name does not already exist.
- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic valueinitialValue- the initial value- Returns:
- a
RemoteAtomicReferenceinstance for the specified name
-
localAtomicMarkableReference
ReturnLocalAtomicMarkableReferenceinstance for the specified name.- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic value- Returns:
- a
LocalAtomicMarkableReferenceinstance for the specified name
-
localAtomicMarkableReference
public static <V> LocalAtomicMarkableReference<V> localAtomicMarkableReference(String sName, V initialValue, boolean fInitialMark) ReturnLocalAtomicMarkableReferenceinstance for the specified name and initial value and mark.The initial value and mark will only be set if the atomic value with the specified name does not already exist.
- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic valueinitialValue- the initial valuefInitialMark- the initial mark- Returns:
- a
LocalAtomicMarkableReferenceinstance for the specified name
-
remoteAtomicMarkableReference
ReturnRemoteAtomicMarkableReferenceinstance for the specified name.- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic value- Returns:
- a
RemoteAtomicMarkableReferenceinstance for the specified name
-
remoteAtomicMarkableReference
public static <V> RemoteAtomicMarkableReference<V> remoteAtomicMarkableReference(String sName, V initialValue, boolean fInitialMark) ReturnRemoteAtomicMarkableReferenceinstance for the specified name and initial value and mark.The initial value and mark will only be set if the atomic value with the specified name does not already exist.
- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic valueinitialValue- the initial valuefInitialMark- the initial mark- Returns:
- a
RemoteAtomicMarkableReferenceinstance for the specified name
-
localAtomicStampedReference
ReturnLocalAtomicStampedReferenceinstance for the specified name.- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic value- Returns:
- a
LocalAtomicStampedReferenceinstance for the specified name
-
localAtomicStampedReference
public static <V> LocalAtomicStampedReference<V> localAtomicStampedReference(String sName, V initialValue, int nInitialStamp) ReturnLocalAtomicStampedReferenceinstance for the specified name and initial value and stamp.The initial value and stamp will only be set if the atomic value with the specified name does not already exist.
- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic valueinitialValue- the initial valuenInitialStamp- the initial stamp- Returns:
- a
LocalAtomicStampedReferenceinstance for the specified name
-
remoteAtomicStampedReference
ReturnRemoteAtomicStampedReferenceinstance for the specified name.- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic value- Returns:
- a
RemoteAtomicStampedReferenceinstance for the specified name
-
remoteAtomicStampedReference
public static <V> RemoteAtomicStampedReference<V> remoteAtomicStampedReference(String sName, V initialValue, int nInitialStamp) ReturnRemoteAtomicStampedReferenceinstance for the specified name and initial value and stamp.The initial value and stamp will only be set if the atomic value with the specified name does not already exist.
- Type Parameters:
V- the type of object referred to by this reference- Parameters:
sName- the name of the atomic valueinitialValue- the initial valuenInitialStamp- the initial stamp- Returns:
- a
RemoteAtomicStampedReferenceinstance for the specified name
-