public class PlatformContextImpl extends Object implements PlatformContext, PartitionsExchangeAware
| Constructor and Description |
|---|
PlatformContextImpl(GridKernalContext ctx,
PlatformCallbackGateway gate,
PlatformMemoryManagerImpl mem,
String platform)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(ClusterNode node)
Sends node info to native platform, if necessary.
|
PlatformCacheEntryFilter |
createCacheEntryFilter(Object filter,
long ptr)
Create cache entry filter.
|
PlatformCacheEntryProcessor |
createCacheEntryProcessor(Object proc,
long ptr)
Create cache entry processor.
|
PlatformJob |
createClosureJob(Object task,
long ptr,
Object job)
Create closure job.
|
PlatformClusterNodeFilter |
createClusterNodeFilter(Object filter)
Create cluster node filter.
|
PlatformContinuousQuery |
createContinuousQuery(long ptr,
boolean hasFilter,
@Nullable Object filter) |
PlatformContinuousQueryFilter |
createContinuousQueryFilter(Object filter)
Create continuous query filter to be deployed on remote node.
|
PlatformJob |
createJob(Object task,
long ptr,
@Nullable Object job)
Create job.
|
PlatformEventFilterListener |
createLocalEventFilter(long hnd)
Create local event filter.
|
PlatformNativeException |
createNativeException(Object cause)
Create native exception.
|
PlatformEventFilterListener |
createRemoteEventFilter(Object pred,
int... types)
Create remote event filter.
|
PlatformMessageFilter |
createRemoteMessageFilter(Object filter,
long ptr)
Create remote message filter.
|
PlatformStreamReceiver |
createStreamReceiver(Object rcv,
long ptr,
boolean keepBinary)
Create stream receiver.
|
void |
disableThreadLocalForPlatformCacheUpdate()
Disables thread-local optimization for platform cache update.
|
void |
enableThreadLocalForPlatformCacheUpdate()
Enables thread-local optimization for platform cache update.
|
PlatformCallbackGateway |
gateway()
Gets platform callback gateway.
|
@Nullable BinaryMetadata |
getBinaryType(String typeName)
Gets platform binary type metadata.
|
byte |
getMarshallerPlatformId()
Gets marshaller platform id (see
MarshallerPlatformIds). |
boolean |
isEventTypeSupported(int evtTyp)
Check whether the given event type is supported.
|
boolean |
isPlatformCacheSupported()
Gets a value indicating whether current platform supports native cache.
|
GridKernalContext |
kernalContext()
Gets kernal context.
|
PlatformMemoryManager |
memory()
Gets platform memory manager.
|
void |
onDoneAfterTopologyUnlock(GridDhtPartitionsExchangeFuture fut)
Callback from exchange process completion; called after topology is unlocked.
|
String |
platform()
Gets the current platform name.
|
void |
processMetadata(BinaryRawReaderEx reader)
Process metadata from the platform.
|
BinaryRawReaderEx |
reader(PlatformInputStream in)
Get memory reader.
|
BinaryRawReaderEx |
reader(PlatformMemory mem)
Get memory reader.
|
void |
updatePlatformCache(int cacheId,
byte[] keyBytes,
byte[] valBytes,
int part,
AffinityTopologyVersion ver)
Updates the platform cache cache.
|
void |
writeAllMetadata(BinaryRawWriterEx writer)
Write all available metadata.
|
void |
writeClusterMetrics(BinaryRawWriterEx writer,
@Nullable ClusterMetrics metrics)
Write cluster metrics.
|
void |
writeEvent(BinaryRawWriterEx writer,
Event evt)
Write event.
|
void |
writeMetadata(BinaryRawWriterEx writer,
int typeId,
boolean includeSchemas)
Write metadata for the given type ID.
|
void |
writeNode(BinaryRawWriterEx writer,
ClusterNode node)
Writes a node id to a stream and sends node info to native platform, if necessary.
|
void |
writeNodes(BinaryRawWriterEx writer,
Collection<ClusterNode> nodes)
Writes multiple node ids to a stream and sends node info to native platform, if necessary.
|
BinaryRawWriterEx |
writer(PlatformMemory mem)
Get memory writer.
|
BinaryRawWriterEx |
writer(PlatformOutputStream out)
Get memory writer.
|
void |
writeSchema(BinaryRawWriterEx writer,
int typeId,
int schemaId)
Write schema for the given type ID and schema ID.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonDoneBeforeTopologyUnlock, onInitAfterTopologyLock, onInitBeforeTopologyLockpublic PlatformContextImpl(GridKernalContext ctx, PlatformCallbackGateway gate, PlatformMemoryManagerImpl mem, String platform)
ctx - Kernal context.gate - Callback gateway.mem - Memory manager.platform - Platform name.public GridKernalContext kernalContext()
kernalContext in interface PlatformContextpublic PlatformMemoryManager memory()
memory in interface PlatformContextpublic PlatformCallbackGateway gateway()
gateway in interface PlatformContextpublic BinaryRawReaderEx reader(PlatformMemory mem)
reader in interface PlatformContextmem - Memory.public BinaryRawReaderEx reader(PlatformInputStream in)
reader in interface PlatformContextin - Input.public BinaryRawWriterEx writer(PlatformMemory mem)
writer in interface PlatformContextmem - Memory.public BinaryRawWriterEx writer(PlatformOutputStream out)
writer in interface PlatformContextout - Output.public void addNode(ClusterNode node)
addNode in interface PlatformContextnode - Node.public void writeNode(BinaryRawWriterEx writer, ClusterNode node)
writeNode in interface PlatformContextwriter - Writer.node - Node.public void writeNodes(BinaryRawWriterEx writer, Collection<ClusterNode> nodes)
writeNodes in interface PlatformContextwriter - Writer.nodes - Nodes.public void writeClusterMetrics(BinaryRawWriterEx writer, @Nullable @Nullable ClusterMetrics metrics)
writeClusterMetrics in interface PlatformContextwriter - Writer.metrics - Metrics.public void processMetadata(BinaryRawReaderEx reader)
processMetadata in interface PlatformContextreader - Reader.public void writeMetadata(BinaryRawWriterEx writer, int typeId, boolean includeSchemas)
writeMetadata in interface PlatformContextwriter - Writer.typeId - Type ID.includeSchemas - Whether to include binary object schemas into the result.public void writeAllMetadata(BinaryRawWriterEx writer)
writeAllMetadata in interface PlatformContextwriter - Writer.public void writeSchema(BinaryRawWriterEx writer, int typeId, int schemaId)
writeSchema in interface PlatformContextwriter - Writer.typeId - Type ID.schemaId - Schema ID.public PlatformContinuousQuery createContinuousQuery(long ptr, boolean hasFilter, @Nullable @Nullable Object filter)
createContinuousQuery in interface PlatformContextptr - Pointer to continuous query deployed on the platform.hasFilter - Whether filter exists.filter - Filter.public PlatformContinuousQueryFilter createContinuousQueryFilter(Object filter)
createContinuousQueryFilter in interface PlatformContextfilter - Native filter.public PlatformMessageFilter createRemoteMessageFilter(Object filter, long ptr)
createRemoteMessageFilter in interface PlatformContextfilter - Native filter.ptr - Pointer of deployed native filter.public boolean isEventTypeSupported(int evtTyp)
isEventTypeSupported in interface PlatformContextevtTyp - Event type.True if supported.public void writeEvent(BinaryRawWriterEx writer, Event evt)
writeEvent in interface PlatformContextwriter - Writer.evt - Event.public PlatformEventFilterListener createLocalEventFilter(long hnd)
createLocalEventFilter in interface PlatformContexthnd - Native handle.public PlatformEventFilterListener createRemoteEventFilter(Object pred, int... types)
createRemoteEventFilter in interface PlatformContextpred - Native predicate.types - Event types.public PlatformNativeException createNativeException(Object cause)
createNativeException in interface PlatformContextcause - Native cause.public PlatformJob createJob(Object task, long ptr, @Nullable @Nullable Object job)
createJob in interface PlatformContexttask - Task.ptr - Pointer.job - Native job.public PlatformJob createClosureJob(Object task, long ptr, Object job)
createClosureJob in interface PlatformContexttask - Native task.ptr - Pointer.job - Native job.public PlatformCacheEntryProcessor createCacheEntryProcessor(Object proc, long ptr)
createCacheEntryProcessor in interface PlatformContextproc - Native processor.ptr - Pointer.public PlatformCacheEntryFilter createCacheEntryFilter(Object filter, long ptr)
createCacheEntryFilter in interface PlatformContextfilter - Native filter.ptr - Pointer.public PlatformStreamReceiver createStreamReceiver(Object rcv, long ptr, boolean keepBinary)
createStreamReceiver in interface PlatformContextrcv - Native receiver.ptr - Pointer.keepBinary - Keep binary flag.public PlatformClusterNodeFilter createClusterNodeFilter(Object filter)
createClusterNodeFilter in interface PlatformContextfilter - Native filter.public String platform()
platform in interface PlatformContextpublic boolean isPlatformCacheSupported()
isPlatformCacheSupported in interface PlatformContextpublic void updatePlatformCache(int cacheId,
byte[] keyBytes,
byte[] valBytes,
int part,
AffinityTopologyVersion ver)
updatePlatformCache in interface PlatformContextcacheId - Cache id.keyBytes - Serialized key to update.valBytes - Serialized value.part - Key partition.ver - Key version.public void enableThreadLocalForPlatformCacheUpdate()
enableThreadLocalForPlatformCacheUpdate in interface PlatformContextpublic void disableThreadLocalForPlatformCacheUpdate()
disableThreadLocalForPlatformCacheUpdate in interface PlatformContext@Nullable public @Nullable BinaryMetadata getBinaryType(String typeName)
getBinaryType in interface PlatformContexttypeName - Type name.public byte getMarshallerPlatformId()
MarshallerPlatformIds).getMarshallerPlatformId in interface PlatformContextpublic void onDoneAfterTopologyUnlock(GridDhtPartitionsExchangeFuture fut)
onDoneAfterTopologyUnlock in interface PartitionsExchangeAwarefut - Partition map exchange future.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021