|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ToolkitAtomicLong
A toolkit atomic long that can be used to maintain counters in the toolkit in a thread-safe manner across the toolkit implementation platform.
Consult the Toolkit class level docs for more info on behavior regarding destroy.
Method Summary | |
---|---|
long |
addAndGet(long delta)
Atomically add the supplied value to the current value. |
byte |
byteValue()
Number.byteValue() |
boolean |
compareAndSet(long expect,
long update)
Atomically set the value to the new value if the current value == the given value. |
long |
decrementAndGet()
Atomically decrement the current value by one. |
double |
doubleValue()
Number.doubleValue() |
float |
floatValue()
Number.floatValue() |
long |
get()
Get the current value. |
long |
getAndAdd(long delta)
Atomically add the supplied value to the current value. |
long |
getAndDecrement()
Atomically decrement the current value. |
long |
getAndIncrement()
Atomically increment the current value. |
long |
getAndSet(long newValue)
Atomically: set to the given value and return the previous value. |
long |
incrementAndGet()
Atomically increment the current value |
int |
intValue()
Number.intValue() |
long |
longValue()
Number.longValue() |
void |
set(long newValue)
Set to the given value |
short |
shortValue()
Number.shortValue() |
Methods inherited from interface org.terracotta.toolkit.object.Destroyable |
---|
destroy, isDestroyed |
Methods inherited from interface org.terracotta.toolkit.object.ToolkitObject |
---|
getName |
Method Detail |
---|
long addAndGet(long delta)
delta
- the value to add
boolean compareAndSet(long expect, long update)
expect
- the expected valueupdate
- the new value
long decrementAndGet()
long get()
long getAndAdd(long delta)
delta
- the value to add
long getAndDecrement()
long getAndIncrement()
long getAndSet(long newValue)
newValue
- the new value
long incrementAndGet()
void set(long newValue)
newValue
- the new valuebyte byteValue()
Number.byteValue()
short shortValue()
Number.shortValue()
int intValue()
Number.intValue()
long longValue()
Number.longValue()
float floatValue()
Number.floatValue()
double doubleValue()
Number.doubleValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |