|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.utils.concurrency.AtomicIntegerList
public class AtomicIntegerList
Constructor Summary | |
---|---|
AtomicIntegerList(int initialCapacity,
int capacityStep)
|
Method Summary | |
---|---|
int |
addAndGet(int i,
int delta)
Atomically add the given value to element at index i. |
int |
capacity()
Returns current capacity of the array. |
boolean |
compareAndSet(int i,
int expect,
int update)
Atomically set the value to the given updated value if the current value == the expected value. |
int |
decrementAndGet(int i)
Atomically decrement by one the element at index i. |
int |
get(int i)
Get the current value at position i. |
int |
getAndAdd(int i,
int delta)
Atomically add the given value to element at index i. |
int |
getAndDecrement(int i)
Atomically decrement by one the element at index i. |
int |
getAndIncrement(int i)
Atomically increment by one the element at index i. |
int |
getAndSet(int i,
int newValue)
Set the element at position i to the given value and return the old value. |
int |
incrementAndGet(int i)
Atomically increment by one the element at index i. |
void |
set(int i,
int 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,
int expect,
int 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 AtomicIntegerList(int initialCapacity, int capacityStep)
Method Detail |
---|
public int addAndGet(int i, int delta)
i
- delta
-
public boolean compareAndSet(int i, int expect, int update)
i
- expect
- update
-
public int decrementAndGet(int i)
i
-
public int get(int i)
i
-
public int getAndAdd(int i, int delta)
i
- delta
-
public int getAndDecrement(int i)
i
-
public int getAndIncrement(int i)
i
-
public int getAndSet(int i, int newValue)
i
- newValue
-
public int incrementAndGet(int i)
i
-
public int size()
public int capacity()
public void set(int i, int newValue)
i
- newValue
- public boolean weakCompareAndSet(int i, int expect, int update)
i
- expect
- update
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |