public class GridCacheSwapManager extends GridCacheManagerAdapter
cctx, log| Constructor and Description |
|---|
GridCacheSwapManager(boolean enabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOffHeapListener(int part,
GridCacheSwapListener lsnr) |
void |
addSwapListener(int part,
GridCacheSwapListener lsnr) |
void |
clearOffHeap()
Clears off-heap.
|
void |
clearSwap()
Clears swap.
|
boolean |
containsKey(KeyCacheObject key,
int part) |
GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry>> |
iterator(int part)
Gets offheap and swap iterator over partition.
|
<K,V> Iterator<Map.Entry<K,V>> |
lazyOffHeapIterator() |
<K,V> 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
|
int |
offheapEntriesCount(boolean primary,
boolean backup,
AffinityTopologyVersion topVer) |
<K,V> Iterator<javax.cache.Cache.Entry<K,V>> |
offheapIterator(boolean primary,
boolean backup,
AffinityTopologyVersion topVer) |
GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry>> |
offHeapIterator(int part)
Gets offheap iterator over partition.
|
Iterator<KeyCacheObject> |
offHeapKeyIterator(boolean primary,
boolean backup,
AffinityTopologyVersion topVer) |
int |
onUndeploy(ClassLoader ldr) |
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawIterator()
Gets offheap and swap iterator over partition.
|
<T> GridCloseableIterator<T> |
rawOffHeapIterator(CX2<T2<Long,Integer>,T2<Long,Integer>,T> c,
Integer part,
boolean primary,
boolean backup) |
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawOffHeapIterator(Integer part,
boolean primary,
boolean backup) |
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawSwapIterator(boolean primary,
boolean backup) |
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawSwapIterator(int part) |
Collection<GridCacheBatchSwapEntry> |
readAndRemove(Collection<? extends KeyCacheObject> keys) |
GridCacheSwapEntry |
readOffheapBeforeRemove(KeyCacheObject key,
byte[] keyBytes,
int part)
Reads value from offheap and unswaps it for indexing.
|
CacheObject |
readValue(KeyCacheObject key,
boolean readOffheap,
boolean readSwap) |
void |
remove(KeyCacheObject key) |
void |
removeOffHeapListener(int part,
GridCacheSwapListener lsnr) |
void |
removeSwapListener(int part,
GridCacheSwapListener lsnr) |
String |
spaceName() |
void |
start0() |
boolean |
swapEnabled() |
int |
swapEntriesCount(boolean primary,
boolean backup,
AffinityTopologyVersion topVer) |
<K,V> Iterator<javax.cache.Cache.Entry<K,V>> |
swapIterator(boolean primary,
boolean backup,
AffinityTopologyVersion topVer) |
GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry>> |
swapIterator(int part)
Gets swap space iterator over partition.
|
Iterator<KeyCacheObject> |
swapKeyIterator(boolean primary,
boolean backup,
AffinityTopologyVersion topVer) |
long |
swapKeys()
Gets number of swap entries (keys).
|
long |
swapSize() |
void |
unwindOffheapEvicts() |
context, kernalStartInfo, kernalStopInfo, log, onDisconnected, 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 void unwindOffheapEvicts()
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, int part) throws IgniteCheckedException
key - Key to check.part - Partition.True if key is contained.IgniteCheckedException - If failed.@Nullable public CacheObject readValue(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 GridCacheSwapEntry readOffheapBeforeRemove(KeyCacheObject key, byte[] keyBytes, int part) throws IgniteCheckedException
key - Key.keyBytes - Key bytes.part - Partition.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, Integer part, boolean primary, boolean backup)
c - Key/value closure.part - Partition.primary - Include primaries.backup - Include backups.public GridCloseableIterator<Map.Entry<byte[],byte[]>> rawOffHeapIterator(@Nullable Integer part, boolean primary, boolean backup)
part - Partition.primary - Include primaries.backup - Include backups.@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(boolean primary, boolean backup) throws IgniteCheckedException
primary - Include primaries.backup - Include backups.IgniteCheckedException - If failed.public GridCloseableIterator<Map.Entry<byte[],byte[]>> rawSwapIterator(int part) throws IgniteCheckedException
part - Partition.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.4.0 Release Date : September 24 2015