public class GridOffHeapProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeTypectx, diagnosticLog, log| Constructor and Description |
|---|
GridOffHeapProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
long |
allocatedSize(@Nullable String spaceName)
Gets size of a memory allocated for the entries of the given space.
|
boolean |
contains(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
Checks if offheap space contains value for the given key.
|
void |
create(@Nullable String spaceName,
int parts,
long init,
long max,
@Nullable GridOffHeapEvictListener lsnr)
Creates offheap map for given space name.
|
void |
destruct(@Nullable String spaceName)
Destructs offheap map for given space name.
|
void |
enableEviction(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
Enables eviction for entry after
valuePointer(java.lang.String, int, org.apache.ignite.internal.processors.cache.KeyCacheObject, byte[]) was called. |
long |
entriesCount(@Nullable String spaceName)
Gets number of elements in the given space.
|
long |
entriesCount(@Nullable String spaceName,
Set<Integer> parts)
Gets number of elements in the given space.
|
@Nullable byte[] |
get(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
Gets value bytes from offheap space for the given key.
|
<T> T |
getValue(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes,
@Nullable ClassLoader ldr)
Gets value from offheap space for the given key.
|
GridCloseableIterator<IgniteBiTuple<byte[],byte[]>> |
iterator(@Nullable String spaceName)
Gets iterator over contents of the given space.
|
<T> GridCloseableIterator<T> |
iterator(@Nullable String spaceName,
CX2<T2<Long,Integer>,T2<Long,Integer>,T> c)
Gets iterator over contents of the given space.
|
<T> GridCloseableIterator<T> |
iterator(@Nullable String spaceName,
CX2<T2<Long,Integer>,T2<Long,Integer>,T> c,
int part)
Gets iterator over contents of the given space.
|
GridCloseableIterator<IgniteBiTuple<byte[],byte[]>> |
iterator(@Nullable String spaceName,
int part)
Gets iterator over contents of partition.
|
void |
put(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes,
byte[] valBytes)
Puts the given value to offheap space for the given key.
|
@Nullable byte[] |
remove(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
Removes value from offheap space for the given key.
|
boolean |
removex(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
Removes value from offheap space for the given key.
|
boolean |
removex(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes,
IgniteBiPredicate<Long,Integer> p)
Removes value from offheap space for the given key.
|
void |
stop(boolean cancel)
Stops grid component.
|
@Nullable IgniteBiTuple<Long,Integer> |
valuePointer(@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
Gets value pointer from offheap space for the given key.
|
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, toString, validateNode, validateNodepublic GridOffHeapProcessor(GridKernalContext ctx)
ctx - Kernal context.public void create(@Nullable
@Nullable String spaceName,
int parts,
long init,
long max,
@Nullable
@Nullable GridOffHeapEvictListener lsnr)
spaceName - Space name.parts - Partitions number.init - Initial size.max - Maximum size.lsnr - Eviction listener.public void destruct(@Nullable
@Nullable String spaceName)
spaceName - Space name.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.public boolean contains(@Nullable
@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
throws IgniteCheckedException
spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.true If offheap space contains value for the given key.IgniteCheckedException - If failed.@Nullable
public @Nullable byte[] get(@Nullable
@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
throws IgniteCheckedException
spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.IgniteCheckedException - If failed.@Nullable public @Nullable IgniteBiTuple<Long,Integer> valuePointer(@Nullable @Nullable String spaceName, int part, KeyCacheObject key, byte[] keyBytes) throws IgniteCheckedException
put(java.lang.String, int, org.apache.ignite.internal.processors.cache.KeyCacheObject, byte[], byte[]) or
enableEviction(java.lang.String, int, org.apache.ignite.internal.processors.cache.KeyCacheObject, byte[]) is called.spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.IgniteCheckedException - If failed.public void enableEviction(@Nullable
@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
throws IgniteCheckedException
valuePointer(java.lang.String, int, org.apache.ignite.internal.processors.cache.KeyCacheObject, byte[]) was called.spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.IgniteCheckedException - If failed.@Nullable
public <T> T getValue(@Nullable
@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes,
@Nullable
@Nullable ClassLoader ldr)
throws IgniteCheckedException
spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.ldr - Class loader.IgniteCheckedException - If failed.@Nullable
public @Nullable byte[] remove(@Nullable
@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
throws IgniteCheckedException
spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.IgniteCheckedException - If failed.public void put(@Nullable
@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes,
byte[] valBytes)
throws IgniteCheckedException
spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.valBytes - Value bytes.IgniteCheckedException - If failed.public boolean removex(@Nullable
@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes)
throws IgniteCheckedException
spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.true If succeeded.IgniteCheckedException - If failed.public boolean removex(@Nullable
@Nullable String spaceName,
int part,
KeyCacheObject key,
byte[] keyBytes,
IgniteBiPredicate<Long,Integer> p)
throws IgniteCheckedException
spaceName - Space name.part - Partition.key - Key.keyBytes - Key bytes.p - Value predicate (arguments are value address and value length).true If succeeded.IgniteCheckedException - If failed.public GridCloseableIterator<IgniteBiTuple<byte[],byte[]>> iterator(@Nullable @Nullable String spaceName)
spaceName - Space name.public <T> GridCloseableIterator<T> iterator(@Nullable @Nullable String spaceName, CX2<T2<Long,Integer>,T2<Long,Integer>,T> c)
spaceName - Space name.c - Key/value closure.public <T> GridCloseableIterator<T> iterator(@Nullable @Nullable String spaceName, CX2<T2<Long,Integer>,T2<Long,Integer>,T> c, int part)
spaceName - Space name.c - Key/value closure.part - Partition.public long entriesCount(@Nullable
@Nullable String spaceName)
spaceName - Space name. Optional.-1 if no space with the given name has been found.public long entriesCount(@Nullable
@Nullable String spaceName,
Set<Integer> parts)
spaceName - Space name. Optional.parts - Partitions.-1 if no space with the given name has been found.public long allocatedSize(@Nullable
@Nullable String spaceName)
spaceName - Space name. Optional.-1 if no space with the given name has been found.public GridCloseableIterator<IgniteBiTuple<byte[],byte[]>> iterator(@Nullable @Nullable String spaceName, int part)
spaceName - Space name.part - Partition.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021