public class GridCacheSwapManager<K,V> extends GridCacheManagerAdapter<K,V>
cctx, log| Constructor and Description |
|---|
GridCacheSwapManager(boolean enabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOffHeapListener(int part,
GridCacheSwapListener<K,V> lsnr) |
void |
addSwapListener(int part,
GridCacheSwapListener<K,V> lsnr) |
void |
clearOffHeap()
Clears off-heap.
|
void |
clearSwap()
Clears swap.
|
boolean |
containsKey(K key,
byte[] keyBytes) |
GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry<V>>> |
iterator(int part)
Gets offheap and swap iterator over partition.
|
Iterator<Map.Entry<K,V>> |
lazyOffHeapIterator() |
Iterator<Map.Entry<K,V>> |
lazySwapIterator() |
long |
offHeapAllocatedSize()
Gets memory size allocated in off-heap.
|
boolean |
offHeapEnabled() |
long |
offHeapEntriesCount()
Gets number of elements in off-heap
|
GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry<V>>> |
offHeapIterator(int part)
Gets offheap iterator over partition.
|
int |
onUndeploy(UUID leftNodeId,
ClassLoader ldr) |
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawIterator()
Gets offheap and swap iterator over partition.
|
Collection<GridCacheBatchSwapEntry<K,V>> |
readAndRemove(Collection<? extends K> keys) |
void |
removeOffHeapListener(int part,
GridCacheSwapListener<K,V> lsnr) |
void |
removeSwapListener(int part,
GridCacheSwapListener<K,V> lsnr) |
void |
start0() |
boolean |
swapEnabled() |
GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry<V>>> |
swapIterator(int part)
Gets swap space iterator over partition.
|
long |
swapKeys()
Gets number of swap entries (keys).
|
long |
swapSize() |
context, kernalStartInfo, kernalStopInfo, log, onKernalStart, onKernalStart0, onKernalStop, onKernalStop0, printMemoryStats, start, startInfo, stop, stop0, stopInfo, toStringpublic GridCacheSwapManager(boolean enabled)
enabled - Flag to indicate if swap is enabled.public void start0()
throws GridException
start0 in class GridCacheManagerAdapter<K,V>GridException - If failed.public boolean swapEnabled()
True if swap store is enabled.public boolean offHeapEnabled()
True if off-heap cache is enabled.public long swapSize()
throws GridException
GridException - If failed.public long swapKeys()
throws GridException
GridException - If failed.public void addSwapListener(int part,
GridCacheSwapListener<K,V> lsnr)
part - Partition.lsnr - Listener.public void removeSwapListener(int part,
GridCacheSwapListener<K,V> lsnr)
part - Partition.lsnr - Listener.public void addOffHeapListener(int part,
GridCacheSwapListener<K,V> lsnr)
part - Partition.lsnr - Listener.public void removeOffHeapListener(int part,
GridCacheSwapListener<K,V> lsnr)
part - Partition.lsnr - Listener.public boolean containsKey(K key, byte[] keyBytes) throws GridException
key - Key to check.keyBytes - Key bytes to check.True if key is contained.GridException - If failed.public Collection<GridCacheBatchSwapEntry<K,V>> readAndRemove(Collection<? extends K> keys) throws GridException
keys - Collection of keys to remove from swap.GridException - If failed,public void clearOffHeap()
public void clearSwap()
throws GridException
GridException - If failed.@Nullable public GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry<V>>> iterator(int part) throws GridException
part - Partition to iterate over.GridException - If failed.@Nullable public GridCloseableIterator<Map.Entry<byte[],byte[]>> rawIterator() throws GridException
GridException - If failed.public Iterator<Map.Entry<K,V>> lazySwapIterator() throws GridException
GridException - If failed.public Iterator<Map.Entry<K,V>> lazyOffHeapIterator()
public long offHeapEntriesCount()
0 if off-heap is disabled.public long offHeapAllocatedSize()
0 if off-heap is disabled.@Nullable public GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry<V>>> offHeapIterator(int part) throws GridException
part - Partition to iterate over.GridException - If failed.@Nullable public GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry<V>>> swapIterator(int part) throws GridException
part - Partition to iterate over.GridException - If failed.public int onUndeploy(UUID leftNodeId, ClassLoader ldr)
leftNodeId - Left Node ID.ldr - Undeployed class loader.Copyright © 2014. All rights reserved.