public final class DataStateStoreConcurrentImpl extends java.lang.Object implements DataStateStore
DataStateStore using the
NonBlockingHashMap together with a compare-and-swap operation.EMPTY_IMMUTABLE_STATE, EMPTY_STATE_INDEX, NO_ENTRY, START_INDEX| Constructor and Description |
|---|
DataStateStoreConcurrentImpl(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
DataState |
get(int index)
Returns the
DataState that is stored under the specified index. |
int |
putIfAbsent(DataState state)
Stores the
DataState and returns the index that it is stored under. |
int |
size() |
public DataStateStoreConcurrentImpl(int initialCapacity)
public DataState get(int index)
DataStateStoreDataState that is stored under the specified index.get in interface DataStateStoreDataState or NULL, if there is nonepublic int putIfAbsent(DataState state)
DataStateStoreDataState and returns the index that it is stored under.putIfAbsent in interface DataStateStorepublic int size()
size in interface DataStateStoreDataState in this store