public final class GridCacheDataStructuresManager<K,V> extends GridCacheManagerAdapter<K,V>
cctx, log| Constructor and Description |
|---|
GridCacheDataStructuresManager()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
GridCacheAtomicLong |
atomicLong(String name,
long initVal,
boolean create)
Gets an atomic long from cache or creates one if it's not cached.
|
<T> GridCacheAtomicReference<T> |
atomicReference(String name,
T initVal,
boolean create)
Gets an atomic reference from cache or creates one if it's not cached.
|
<T,S> GridCacheAtomicStamped<T,S> |
atomicStamped(String name,
T initVal,
S initStamp,
boolean create)
Gets an atomic stamped from cache or creates one if it's not cached.
|
GridCacheCountDownLatch |
countDownLatch(String name,
int cnt,
boolean autoDel,
boolean create)
Gets or creates count down latch.
|
void |
onEntryUpdated(K key,
boolean rmv)
Entry update callback.
|
protected void |
onKernalStart0() |
protected void |
onKernalStop0(boolean cancel) |
void |
onPartitionEvicted(int part)
Partition evicted callback.
|
void |
onTxCommitted(GridCacheTxEx<K,V> tx)
Transaction committed callback for transaction manager.
|
void |
printMemoryStats()
Prints memory statistics (sizes of internal data structures, etc.).
|
<T> GridCacheQueue<T> |
queue(String name,
int cap,
boolean colloc,
boolean create)
Gets a queue from cache or creates one if it's not cached.
|
boolean |
removeAtomicLong(String name)
Removes atomic long from cache.
|
boolean |
removeAtomicReference(String name)
Removes atomic reference from cache.
|
boolean |
removeAtomicStamped(String name)
Removes atomic stamped from cache.
|
boolean |
removeCountDownLatch(String name)
Removes count down latch from cache.
|
boolean |
removeQueue(String name,
int batchSize)
Removes queue from cache.
|
boolean |
removeSequence(String name)
Removes sequence from cache.
|
boolean |
removeSet(String name)
Removes set.
|
GridCacheAtomicSequence |
sequence(String name,
long initVal,
boolean create)
Gets a sequence from cache or creates one if it's not cached.
|
<T> GridCacheSet<T> |
set(String name,
boolean collocated,
boolean create)
Gets a set from cache or creates one if it's not cached.
|
GridConcurrentHashSet<GridCacheSetItemKey> |
setData(GridUuid id) |
context, kernalStartInfo, kernalStopInfo, log, onKernalStart, onKernalStop, start, start0, startInfo, stop, stop0, stopInfo, toStringpublic GridCacheDataStructuresManager()
protected void onKernalStart0()
onKernalStart0 in class GridCacheManagerAdapter<K,V>protected void onKernalStop0(boolean cancel)
onKernalStop0 in class GridCacheManagerAdapter<K,V>cancel - Cancel flag.public final GridCacheAtomicSequence sequence(String name, long initVal, boolean create) throws GridException
name - Sequence name.initVal - Initial value for sequence. If sequence already cached, initVal will be ignored.create - If true sequence will be created in case it is not in cache.GridException - If loading failed.public final boolean removeSequence(String name) throws GridException
name - Sequence name.true if sequence has been removed and false if it's not cached.GridException - If removing failed.public final GridCacheAtomicLong atomicLong(String name, long initVal, boolean create) throws GridException
name - Name of atomic long.initVal - Initial value for atomic long. If atomic long already cached, initVal
will be ignored.create - If true atomic long will be created in case it is not in cache.GridException - If loading failed.public final boolean removeAtomicLong(String name) throws GridException
name - Atomic long name.true if atomic long has been removed and false if it's not cached.GridException - If removing failed.public final <T> GridCacheAtomicReference<T> atomicReference(String name, T initVal, boolean create) throws GridException
name - Name of atomic reference.initVal - Initial value for atomic reference. If atomic reference already cached, initVal
will be ignored.create - If true atomic reference will be created in case it is not in cache.GridException - If loading failed.public final boolean removeAtomicReference(String name) throws GridException
name - Atomic reference name.true if atomic reference has been removed and false if it's not cached.GridException - If removing failed.public final <T,S> GridCacheAtomicStamped<T,S> atomicStamped(String name, T initVal, S initStamp, boolean create) throws GridException
name - Name of atomic stamped.initVal - Initial value for atomic stamped. If atomic stamped already cached, initVal
will be ignored.initStamp - Initial stamp for atomic stamped. If atomic stamped already cached, initStamp
will be ignored.create - If true atomic stamped will be created in case it is not in cache.GridException - If loading failed.public final boolean removeAtomicStamped(String name) throws GridException
name - Atomic stamped name.true if atomic stamped has been removed and false if it's not cached.GridException - If removing failed.public final <T> GridCacheQueue<T> queue(String name, int cap, boolean colloc, boolean create) throws GridException
name - Name of queue.cap - Max size of queue.colloc - Collocation flag.create - If true queue will be created in case it is not in cache.GridException - If failed.public final boolean removeQueue(String name, int batchSize) throws GridException
name - Queue name.batchSize - Batch size.true if queue has been removed and false if it's not cached.GridException - If removing failed.public GridCacheCountDownLatch countDownLatch(String name, int cnt, boolean autoDel, boolean create) throws GridException
name - Name of the latch.cnt - Initial count.autoDel - True to automatically delete latch from cache when
its count reaches zero.create - If true latch will be created in case it is not in cache,
if it is false all parameters except name are ignored.null if it is not found and
create is false.GridException - If operation failed.public boolean removeCountDownLatch(String name) throws GridException
name - Name of the latch.GridException - If operation failed.public void onTxCommitted(GridCacheTxEx<K,V> tx)
tx - Committed transaction.@Nullable public <T> GridCacheSet<T> set(String name, boolean collocated, boolean create) throws GridException
name - Set name.collocated - Collocation flag.create - If true set will be created in case it is not in cache.GridException - If failed.public boolean removeSet(String name) throws GridException
name - Set name.True if set was removed.GridException - If failed.public void onEntryUpdated(K key, boolean rmv)
key - Key.rmv - True if entry was removed.public void onPartitionEvicted(int part)
part - Partition number.@Nullable public GridConcurrentHashSet<GridCacheSetItemKey> setData(GridUuid id)
id - Set ID.public void printMemoryStats()
printMemoryStats in interface GridCacheManager<K,V>printMemoryStats in class GridCacheManagerAdapter<K,V>Copyright © 2014. All rights reserved.