public static class Atomic.Long
A long
record that may be updated atomically. An Atomic#Long
is used in applications such as atomically incremented sequence numbers, and cannot be used as a replacement for a java.lang.Long. However, this class does extend Number
to allow uniform access by tools and utilities that deal with numerically-based classes.
Constructor and Description |
---|
Long() |
Modifier and Type | Method and Description |
---|---|
long |
addAndGet()
Atomically adds the given value to the current value.
|
boolean |
compareAndSet()
Atomically sets the value to the given updated value if the current value
== the expected value. |
long |
decrementAndGet()
Atomically decrements by one the current value.
|
double |
doubleValue() |
float |
floatValue() |
long |
get()
Gets the current value.
|
long |
getAndAdd()
Atomically adds the given value to the current value.
|
long |
getAndDecrement()
Atomically decrements by one the current value.
|
long |
getAndIncrement()
Atomically increments by one the current value.
|
long |
getAndSet()
Atomically sets to the given value and returns the old value.
|
long |
getRecid() |
long |
incrementAndGet()
Atomically increments by one the current value.
|
int |
intValue() |
long |
longValue() |
void |
set()
Sets to the given value.
|
java.lang.String |
toString()
Returns the String representation of the current value.
|
public Store store
public long recid
public long getRecid()
public long get()
Gets the current value.
public void set()
Sets to the given value.
public long getAndSet()
Atomically sets to the given value and returns the old value.
public boolean compareAndSet()
Atomically sets the value to the given updated value if the current value ==
the expected value.
public long getAndIncrement()
Atomically increments by one the current value.
public long getAndDecrement()
Atomically decrements by one the current value.
public long getAndAdd()
Atomically adds the given value to the current value.
public long incrementAndGet()
Atomically increments by one the current value.
public long decrementAndGet()
Atomically decrements by one the current value.
public long addAndGet()
Atomically adds the given value to the current value.
public java.lang.String toString()
Returns the String representation of the current value.
public int intValue()
public long longValue()
public float floatValue()
public double doubleValue()