public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi>
GridComponent.DiscoveryDataExchangeTypectx, log| Constructor and Description |
|---|
GridSwapSpaceManager(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(String spaceName) |
<K> GridCloseableIterator<K> |
keysIterator(String spaceName,
ClassLoader ldr)
Gets iterator over space entries.
|
protected void |
onKernalStop0(boolean cancel) |
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawIterator(String spaceName)
Gets iterator over space entries.
|
GridCloseableIterator<Map.Entry<byte[],byte[]>> |
rawIterator(String spaceName,
int part)
Gets raw iterator over space entries.
|
byte[] |
read(String spaceName,
SwapKey key,
ClassLoader ldr)
Reads value from swap.
|
<T> T |
readValue(String spaceName,
SwapKey key,
ClassLoader ldr)
Reads value from swap.
|
void |
remove(String spaceName,
SwapKey key,
IgniteInClosure<byte[]> c,
ClassLoader ldr)
Removes value from swap.
|
void |
removeAll(String spaceName,
Collection<SwapKey> keys,
IgniteBiInClosure<SwapKey,byte[]> c,
ClassLoader ldr)
Removes value from swap.
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
long |
swapKeys(String spaceName)
Gets number of swap entries (keys).
|
long |
swapKeys(String spaceName,
Set<Integer> parts)
Gets number of swap entries for given partitions.
|
long |
swapSize(String spaceName)
Gets size in bytes for swap space.
|
void |
write(String spaceName,
SwapKey key,
byte[] val,
ClassLoader ldr)
Writes value to swap.
|
<K,V> void |
writeAll(String spaceName,
Map<SwapKey,byte[]> batch,
ClassLoader ldr)
Writes batch to swap.
|
assertParameter, collectDiscoveryData, discoveryDataType, enabled, getSpi, getSpi, getSpis, onAfterSpiStart, onBeforeSpiStart, onDisconnected, onDiscoveryDataReceived, onKernalStart, onKernalStart0, onKernalStop, onReconnected, printMemoryStats, startInfo, startSpi, stopInfo, stopSpi, toString, validateNodepublic GridSwapSpaceManager(GridKernalContext ctx)
ctx - Grid kernal context.public void start()
throws IgniteCheckedException
IgniteCheckedException - Throws in case of any errors.protected void onKernalStop0(boolean cancel)
onKernalStop0 in class GridManagerAdapter<SwapSpaceSpi>cancel - Cancel flag.public void stop(boolean cancel)
throws IgniteCheckedException
cancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.@Nullable
public byte[] read(@Nullable
String spaceName,
SwapKey key,
@Nullable
ClassLoader ldr)
throws IgniteCheckedException
spaceName - Space name.key - Key.ldr - Class loader (optional).IgniteCheckedException - If failed.@Nullable
public <T> T readValue(@Nullable
String spaceName,
SwapKey key,
@Nullable
ClassLoader ldr)
throws IgniteCheckedException
spaceName - Space name.key - Swap key.ldr - Class loader (optional).IgniteCheckedException - If failed.public void write(@Nullable
String spaceName,
SwapKey key,
byte[] val,
@Nullable
ClassLoader ldr)
throws IgniteCheckedException
spaceName - Space name.key - Key.val - Value.ldr - Class loader (optional).IgniteCheckedException - If failed.public <K,V> void writeAll(String spaceName, Map<SwapKey,byte[]> batch, @Nullable ClassLoader ldr) throws IgniteCheckedException
spaceName - Space name.batch - Swapped entries.ldr - Class loader (optional).IgniteCheckedException - If failed.public void remove(@Nullable
String spaceName,
SwapKey key,
@Nullable
IgniteInClosure<byte[]> c,
@Nullable
ClassLoader ldr)
throws IgniteCheckedException
spaceName - Space name.key - Key.c - Optional closure that takes removed value and executes after actual
removing. If there was no value in storage the closure is executed given
null value as parameter.ldr - Class loader (optional).IgniteCheckedException - If failed.public void removeAll(@Nullable
String spaceName,
Collection<SwapKey> keys,
IgniteBiInClosure<SwapKey,byte[]> c,
@Nullable
ClassLoader ldr)
throws IgniteCheckedException
spaceName - Space name.keys - Collection of keys.c - Optional closure that takes removed value and executes after actual
removing. If there was no value in storage the closure is executed given
null value as parameter.ldr - Class loader (optional).IgniteCheckedException - If failed.public long swapSize(@Nullable
String spaceName)
throws IgniteCheckedException
spaceName - Space name.IgniteCheckedException - If failed.public long swapKeys(@Nullable
String spaceName)
throws IgniteCheckedException
spaceName - Space name.IgniteCheckedException - If failed.public long swapKeys(@Nullable
String spaceName,
Set<Integer> parts)
throws IgniteCheckedException
spaceName - Space name.parts - Partitions.IgniteCheckedException - If failed.public void clear(@Nullable
String spaceName)
throws IgniteCheckedException
spaceName - Space name.IgniteCheckedException - If failed.@Nullable public GridCloseableIterator<Map.Entry<byte[],byte[]>> rawIterator(@Nullable String spaceName) throws IgniteCheckedException
spaceName - Space name.null if space is unknown.IgniteSpiException - If failed.IgniteCheckedException@Nullable public GridCloseableIterator<Map.Entry<byte[],byte[]>> rawIterator(@Nullable String spaceName, int part) throws IgniteCheckedException
spaceName - Space name.part - Partition.null if space is unknown.IgniteCheckedException - If failed.@Nullable public <K> GridCloseableIterator<K> keysIterator(@Nullable String spaceName, @Nullable ClassLoader ldr) throws IgniteCheckedException
spaceName - Space name.ldr - Class loader.null if space is unknown.IgniteSpiException - If failed.IgniteCheckedException
Follow @ApacheIgnite
Ignite Fabric : ver. 1.9.0 Release Date : March 2 2017