public class GridCacheSwapManager extends GridCacheManagerAdapter
cctx, log| Constructor and Description |
|---|
GridCacheSwapManager(boolean enabled) |
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 IgniteCheckedException
start0 in class GridCacheManagerAdapterIgniteCheckedException - 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 IgniteCheckedException
IgniteCheckedException - If failed.public int swapEntriesCount(boolean primary,
boolean backup,
AffinityTopologyVersion topVer)
throws IgniteCheckedException
primary - If true includes primary entries.backup - If true includes backup entries.topVer - Topology version.IgniteCheckedException - If failed.public int offheapEntriesCount(boolean primary,
boolean backup,
AffinityTopologyVersion topVer)
throws IgniteCheckedException
primary - If true includes primary entries.backup - If true includes backup entries.topVer - Topology version.IgniteCheckedException - If failed.public long swapKeys()
throws IgniteCheckedException
IgniteCheckedException - If failed.public void addSwapListener(int part,
GridCacheSwapListener lsnr)
part - Partition.lsnr - Listener.public void removeSwapListener(int part,
GridCacheSwapListener lsnr)
part - Partition.lsnr - Listener.public void addOffHeapListener(int part,
GridCacheSwapListener lsnr)
part - Partition.lsnr - Listener.public void removeOffHeapListener(int part,
GridCacheSwapListener lsnr)
part - Partition.lsnr - Listener.public boolean containsKey(KeyCacheObject key) throws IgniteCheckedException
key - Key to check.True if key is contained.IgniteCheckedException - If failed.@Nullable public GridCacheSwapEntry read(KeyCacheObject key, boolean readOffheap, boolean readSwap) throws IgniteCheckedException
key - Key to read swap entry for.readOffheap - Read offheap flag.readSwap - Read swap flag.IgniteCheckedException - If read failed.public Collection<GridCacheBatchSwapEntry> readAndRemove(Collection<? extends KeyCacheObject> keys) throws IgniteCheckedException
keys - Collection of keys to remove from swap.IgniteCheckedException - If failed,public void remove(KeyCacheObject key) throws IgniteCheckedException
key - Key to remove.IgniteCheckedException - If failed.public void clearOffHeap()
public void clearSwap()
throws IgniteCheckedException
IgniteCheckedException - If failed.@Nullable public GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry>> iterator(int part) throws IgniteCheckedException
part - Partition to iterate over.IgniteCheckedException - If failed.@Nullable public GridCloseableIterator<Map.Entry<byte[],byte[]>> rawIterator() throws IgniteCheckedException
IgniteCheckedException - If failed.public <K,V> Iterator<Map.Entry<K,V>> lazySwapIterator() throws IgniteCheckedException
IgniteCheckedException - If failed.public Iterator<KeyCacheObject> offHeapKeyIterator(boolean primary, boolean backup, AffinityTopologyVersion topVer)
public Iterator<KeyCacheObject> swapKeyIterator(boolean primary, boolean backup, AffinityTopologyVersion topVer) throws IgniteCheckedException
IgniteCheckedExceptionpublic <K,V> 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>> offHeapIterator(int part) throws IgniteCheckedException
part - Partition to iterate over.IgniteCheckedException - If failed.public <T> GridCloseableIterator<T> rawOffHeapIterator(CX2<T2<Long,Integer>,T2<Long,Integer>,T> c)
c - Key/value closure.public GridCloseableIterator<Map.Entry<byte[],byte[]>> rawOffHeapIterator()
@Nullable public GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry>> swapIterator(int part) throws IgniteCheckedException
part - Partition to iterate over.IgniteCheckedException - If failed.public GridCloseableIterator<Map.Entry<byte[],byte[]>> rawSwapIterator() throws IgniteCheckedException
IgniteCheckedException - If failed.public <K,V> Iterator<javax.cache.Cache.Entry<K,V>> swapIterator(boolean primary, boolean backup, AffinityTopologyVersion topVer) throws IgniteCheckedException
primary - If true includes primary entries.backup - If true includes backup entries.topVer - Topology version.IgniteCheckedException - If failed.public <K,V> Iterator<javax.cache.Cache.Entry<K,V>> offheapIterator(boolean primary, boolean backup, AffinityTopologyVersion topVer) throws IgniteCheckedException
primary - If true includes primary entries.backup - If true includes backup entries.topVer - Topology version.IgniteCheckedException - If failed.public int onUndeploy(ClassLoader ldr)
ldr - Undeployed class loader.public String spaceName()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.1.0-incubating Release Date : May 20 2015