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) |
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,
long topVer) |
<K,V> Iterator<javax.cache.Cache.Entry<K,V>> |
offheapIterator(boolean primary,
boolean backup,
long topVer) |
GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry>> |
offHeapIterator(int part)
Gets offheap iterator over partition.
|
Iterator<KeyCacheObject> |
offHeapKeyIterator(boolean primary,
boolean backup,
long topVer) |
int |
onUndeploy(ClassLoader ldr) |
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawIterator()
Gets offheap and swap iterator over partition.
|
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawOffHeapIterator() |
<T> GridCloseableIterator<T> |
rawOffHeapIterator(CX2<T2<Long,Integer>,T2<Long,Integer>,T> c) |
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawSwapIterator() |
GridCacheSwapEntry |
read(KeyCacheObject key,
boolean readOffheap,
boolean readSwap) |
Collection<GridCacheBatchSwapEntry> |
readAndRemove(Collection<? extends KeyCacheObject> keys) |
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,
long topVer) |
<K,V> Iterator<javax.cache.Cache.Entry<K,V>> |
swapIterator(boolean primary,
boolean backup,
long topVer) |
GridCloseableIterator<Map.Entry<byte[],GridCacheSwapEntry>> |
swapIterator(int part)
Gets swap space iterator over partition.
|
Iterator<KeyCacheObject> |
swapKeyIterator(boolean primary,
boolean backup,
long topVer) |
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 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,
long 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,
long 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, long topVer)
public Iterator<KeyCacheObject> swapKeyIterator(boolean primary, boolean backup, long 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, long 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, long 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.0.0-RC3 Release Date : March 24 2015