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