public interface GridCacheAtomicLong
get() synchronously gets current value of atomic long.
get..(..) methods synchronously get current value of atomic long
and increase or decrease value of atomic long.
addAndGet(long l) synchronously sums l with current value of atomic long
and returns result.
incrementAndGet() synchronously increases value of atomic long and returns result.
decrementAndGet() synchronously decreases value of atomic long and returns result.
getAndSet(long l) synchronously gets current value of atomic long and sets l
as value of atomic long.
name() gets name of atomic long.
| Modifier and Type | Method and Description |
|---|---|
long |
addAndGet(long l)
Adds
l and gets current value of atomic long. |
boolean |
compareAndSet(long expVal,
long newVal)
Atomically compares current value to the expected value, and if they are equal, sets current value
to new value.
|
long |
decrementAndGet()
Decrements and gets current value of atomic long.
|
long |
get()
Gets current value of atomic long.
|
long |
getAndAdd(long l)
Gets current value of atomic long and adds
l. |
long |
getAndDecrement()
Gets and decrements current value of atomic long.
|
long |
getAndIncrement()
Gets and increments current value of atomic long.
|
long |
getAndSet(long l)
Gets current value of atomic long and sets new value
l of atomic long. |
long |
incrementAndGet()
Increments and gets current value of atomic long.
|
String |
name()
Name of atomic long.
|
boolean |
removed()
Gets status of atomic.
|
String name()
long get()
throws GridException
GridException - If operation failed.long incrementAndGet()
throws GridException
GridException - If operation failed.long getAndIncrement()
throws GridException
GridException - If operation failed.long addAndGet(long l)
throws GridException
l and gets current value of atomic long.l - Number which will be added.GridException - If operation failed.long getAndAdd(long l)
throws GridException
l.l - Number which will be added.GridException - If operation failed.long decrementAndGet()
throws GridException
GridException - If operation failed.long getAndDecrement()
throws GridException
GridException - If operation failed.long getAndSet(long l)
throws GridException
l of atomic long.l - New value of atomic long.GridException - If operation failed.boolean compareAndSet(long expVal,
long newVal)
throws GridException
expVal - Expected atomic long's value.newVal - New atomic long's value to set if current value equal to expected value.True if comparison succeeded, false otherwise.GridException - If failed.boolean removed()
true if atomic was removed from cache, false in other case.Copyright © 2014. All rights reserved.