public class AtomicIntegerList extends Object
| Constructor and Description |
|---|
AtomicIntegerList(int initialCapacity,
int capacityStep) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public AtomicIntegerList(int initialCapacity,
int capacityStep)
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 - Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.