Class Atomics
- Since:
- 21.12
- Author:
- Aleks Seovic 2020.12.03
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Extension toAtomicMarkableReference
to allow Java serialization.static class
Extension toAtomicStampedReference
to allow Java serialization. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalAtomicBoolean
localAtomicBoolean
(String sName) ReturnLocalAtomicBoolean
instance for the specified name.static LocalAtomicBoolean
localAtomicBoolean
(String sName, boolean fInitialValue) ReturnLocalAtomicBoolean
instance for the specified name and initial value.static LocalAtomicInteger
localAtomicInteger
(String sName) ReturnLocalAtomicInteger
instance for the specified name.static LocalAtomicInteger
localAtomicInteger
(String sName, int nInitialValue) ReturnLocalAtomicInteger
instance for the specified name and initial value.static LocalAtomicLong
localAtomicLong
(String sName) ReturnLocalAtomicLong
instance for the specified name.static LocalAtomicLong
localAtomicLong
(String sName, long lInitialValue) ReturnLocalAtomicLong
instance for the specified name and initial value.static <V> LocalAtomicMarkableReference
<V> ReturnLocalAtomicMarkableReference
instance for the specified name.static <V> LocalAtomicMarkableReference
<V> localAtomicMarkableReference
(String sName, V initialValue, boolean fInitialMark) ReturnLocalAtomicMarkableReference
instance for the specified name and initial value and mark.static <V> LocalAtomicReference
<V> localAtomicReference
(String sName) ReturnLocalAtomicReference
instance for the specified name.static <V> LocalAtomicReference
<V> localAtomicReference
(String sName, V initialValue) ReturnLocalAtomicReference
instance for the specified name and initial value.static <V> LocalAtomicStampedReference
<V> ReturnLocalAtomicStampedReference
instance for the specified name.static <V> LocalAtomicStampedReference
<V> localAtomicStampedReference
(String sName, V initialValue, int nInitialStamp) ReturnLocalAtomicStampedReference
instance for the specified name and initial value and stamp.static RemoteAtomicBoolean
remoteAtomicBoolean
(String sName) ReturnRemoteAtomicBoolean
instance for the specified name.static RemoteAtomicBoolean
remoteAtomicBoolean
(String sName, boolean fInitialValue) ReturnRemoteAtomicBoolean
instance for the specified name and initial value.static RemoteAtomicInteger
remoteAtomicInteger
(String sName) ReturnRemoteAtomicInteger
instance for the specified name.static RemoteAtomicInteger
remoteAtomicInteger
(String sName, int nInitialValue) ReturnRemoteAtomicInteger
instance for the specified name and initial value.static RemoteAtomicLong
remoteAtomicLong
(String sName) ReturnRemoteAtomicLong
instance for the specified name.static RemoteAtomicLong
remoteAtomicLong
(String sName, long lInitialValue) ReturnRemoteAtomicLong
instance for the specified name and initial value.static <V> RemoteAtomicMarkableReference
<V> ReturnRemoteAtomicMarkableReference
instance for the specified name.static <V> RemoteAtomicMarkableReference
<V> remoteAtomicMarkableReference
(String sName, V initialValue, boolean fInitialMark) ReturnRemoteAtomicMarkableReference
instance for the specified name and initial value and mark.static <V> RemoteAtomicReference
<V> remoteAtomicReference
(String sName) ReturnRemoteAtomicReference
instance for the specified name.static <V> RemoteAtomicReference
<V> remoteAtomicReference
(String sName, V initialValue) ReturnRemoteAtomicReference
instance for the specified name and initial value.static <V> RemoteAtomicStampedReference
<V> ReturnRemoteAtomicStampedReference
instance for the specified name.static <V> RemoteAtomicStampedReference
<V> remoteAtomicStampedReference
(String sName, V initialValue, int nInitialStamp) ReturnRemoteAtomicStampedReference
instance for the specified name and initial value and stamp.
-
Field Details
-
SESSION_NAME
The session name.
-
-
Method Details
-
localAtomicBoolean
ReturnLocalAtomicBoolean
instance for the specified name.- Parameters:
sName
- the name of the atomic value- Returns:
- a
LocalAtomicBoolean
instance for the specified name
-
localAtomicBoolean
ReturnLocalAtomicBoolean
instance 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
LocalAtomicBoolean
instance for the specified name
-
remoteAtomicBoolean
ReturnRemoteAtomicBoolean
instance for the specified name.- Parameters:
sName
- the name of the atomic value- Returns:
- a
RemoteAtomicBoolean
instance for the specified name
-
remoteAtomicBoolean
ReturnRemoteAtomicBoolean
instance 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
RemoteAtomicBoolean
instance for the specified name
-
localAtomicInteger
ReturnLocalAtomicInteger
instance for the specified name.- Parameters:
sName
- the name of the atomic value- Returns:
- a
LocalAtomicInteger
instance for the specified name
-
localAtomicInteger
ReturnLocalAtomicInteger
instance 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
LocalAtomicInteger
instance for the specified name
-
remoteAtomicInteger
ReturnRemoteAtomicInteger
instance for the specified name.- Parameters:
sName
- the name of the atomic value- Returns:
- a
RemoteAtomicInteger
instance for the specified name
-
remoteAtomicInteger
ReturnRemoteAtomicInteger
instance 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
RemoteAtomicInteger
instance for the specified name
-
localAtomicLong
ReturnLocalAtomicLong
instance for the specified name.- Parameters:
sName
- the name of the atomic value- Returns:
- a
LocalAtomicLong
instance for the specified name
-
localAtomicLong
ReturnLocalAtomicLong
instance 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
LocalAtomicLong
instance for the specified name
-
remoteAtomicLong
ReturnRemoteAtomicLong
instance for the specified name.- Parameters:
sName
- the name of the atomic value- Returns:
- a
RemoteAtomicLong
instance for the specified name
-
remoteAtomicLong
ReturnRemoteAtomicLong
instance 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
RemoteAtomicLong
instance for the specified name
-
localAtomicReference
ReturnLocalAtomicReference
instance 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
LocalAtomicReference
instance for the specified name
-
localAtomicReference
ReturnLocalAtomicReference
instance 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
LocalAtomicReference
instance for the specified name
-
remoteAtomicReference
ReturnRemoteAtomicReference
instance 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
RemoteAtomicReference
instance for the specified name
-
remoteAtomicReference
ReturnRemoteAtomicReference
instance 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
RemoteAtomicReference
instance for the specified name
-
localAtomicMarkableReference
ReturnLocalAtomicMarkableReference
instance 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
LocalAtomicMarkableReference
instance for the specified name
-
localAtomicMarkableReference
public static <V> LocalAtomicMarkableReference<V> localAtomicMarkableReference(String sName, V initialValue, boolean fInitialMark) ReturnLocalAtomicMarkableReference
instance 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
LocalAtomicMarkableReference
instance for the specified name
-
remoteAtomicMarkableReference
ReturnRemoteAtomicMarkableReference
instance 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
RemoteAtomicMarkableReference
instance for the specified name
-
remoteAtomicMarkableReference
public static <V> RemoteAtomicMarkableReference<V> remoteAtomicMarkableReference(String sName, V initialValue, boolean fInitialMark) ReturnRemoteAtomicMarkableReference
instance 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
RemoteAtomicMarkableReference
instance for the specified name
-
localAtomicStampedReference
ReturnLocalAtomicStampedReference
instance 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
LocalAtomicStampedReference
instance for the specified name
-
localAtomicStampedReference
public static <V> LocalAtomicStampedReference<V> localAtomicStampedReference(String sName, V initialValue, int nInitialStamp) ReturnLocalAtomicStampedReference
instance 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
LocalAtomicStampedReference
instance for the specified name
-
remoteAtomicStampedReference
ReturnRemoteAtomicStampedReference
instance 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
RemoteAtomicStampedReference
instance for the specified name
-
remoteAtomicStampedReference
public static <V> RemoteAtomicStampedReference<V> remoteAtomicStampedReference(String sName, V initialValue, int nInitialStamp) ReturnRemoteAtomicStampedReference
instance 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
RemoteAtomicStampedReference
instance for the specified name
-