|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.utils.concurrency.AtomicLongList
public class AtomicLongList
Constructor Summary | |
---|---|
AtomicLongList(int initialCapacity,
int capacityStep)
|
Method Summary | |
---|---|
long |
addAndGet(int i,
long delta)
Atomically add the given value to element at index i. |
int |
capacity()
Returns current capacity of the array. |
boolean |
compareAndSet(int i,
long expect,
long update)
Atomically set the value to the given updated value if the current value == the expected value. |
long |
decrementAndGet(int i)
Atomically decrement by one the element at index i. |
long |
get(int i)
Get the current value at position i. |
long |
getAndAdd(int i,
long delta)
Atomically add the given value to element at index i. |
long |
getAndDecrement(int i)
Atomically decrement by one the element at index i. |
long |
getAndIncrement(int i)
Atomically increment by one the element at index i. |
long |
getAndSet(int i,
long newValue)
Set the element at position i to the given value and return the old value. |
long |
incrementAndGet(int i)
Atomically increment by one the element at index i. |
void |
set(int i,
long newValue)
Set the element at position i to the given value. |
int |
size()
Returns the length of the array (== max-touched-index+1). |
boolean |
weakCompareAndSet(int i,
long expect,
long update)
Atomically set the value to the given updated value if the current value == the expected value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AtomicLongList(int initialCapacity, int capacityStep)
Method Detail |
---|
public long addAndGet(int i, long delta)
i
- delta
-
public boolean compareAndSet(int i, long expect, long update)
i
- expect
- update
-
public long decrementAndGet(int i)
i
-
public long get(int i)
i
-
public long getAndAdd(int i, long delta)
i
- delta
-
public long getAndDecrement(int i)
i
-
public long getAndIncrement(int i)
i
-
public long getAndSet(int i, long newValue)
i
- newValue
-
public long incrementAndGet(int i)
i
-
public int size()
public int capacity()
public void set(int i, long newValue)
i
- newValue
- public boolean weakCompareAndSet(int i, long expect, long update)
i
- expect
- update
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |