public class PlatformContextImpl extends Object implements PlatformContext
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,
Object filter) |
PlatformContinuousQueryFilter |
createContinuousQueryFilter(Object filter)
Create continuous query filter to be deployed on remote node.
|
PlatformJob |
createJob(Object task,
long ptr,
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.
|
PlatformCallbackGateway |
gateway()
Gets platform callback gateway.
|
boolean |
isEventTypeSupported(int evtTyp)
Check whether the given event type is supported.
|
GridKernalContext |
kernalContext()
Gets kernal context.
|
PlatformMemoryManager |
memory()
Gets platform memory manager.
|
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 |
writeAllMetadata(BinaryRawWriterEx writer)
Write all available metadata.
|
void |
writeClusterMetrics(BinaryRawWriterEx writer,
ClusterMetrics metrics)
Write cluster metrics.
|
void |
writeEvent(BinaryRawWriterEx writer,
Event evt)
Write event.
|
void |
writeMetadata(BinaryRawWriterEx writer,
int typeId)
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.
|
public 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 PlatformContext
public PlatformMemoryManager memory()
memory
in interface PlatformContext
public PlatformCallbackGateway gateway()
gateway
in interface PlatformContext
public BinaryRawReaderEx reader(PlatformMemory mem)
reader
in interface PlatformContext
mem
- Memory.public BinaryRawReaderEx reader(PlatformInputStream in)
reader
in interface PlatformContext
in
- Input.public BinaryRawWriterEx writer(PlatformMemory mem)
writer
in interface PlatformContext
mem
- Memory.public BinaryRawWriterEx writer(PlatformOutputStream out)
writer
in interface PlatformContext
out
- Output.public void addNode(ClusterNode node)
addNode
in interface PlatformContext
node
- Node.public void writeNode(BinaryRawWriterEx writer, ClusterNode node)
writeNode
in interface PlatformContext
writer
- Writer.node
- Node.public void writeNodes(BinaryRawWriterEx writer, Collection<ClusterNode> nodes)
writeNodes
in interface PlatformContext
writer
- Writer.nodes
- Nodes.public void writeClusterMetrics(BinaryRawWriterEx writer, @Nullable ClusterMetrics metrics)
writeClusterMetrics
in interface PlatformContext
writer
- Writer.metrics
- Metrics.public void processMetadata(BinaryRawReaderEx reader)
processMetadata
in interface PlatformContext
reader
- Reader.public void writeMetadata(BinaryRawWriterEx writer, int typeId)
writeMetadata
in interface PlatformContext
writer
- Writer.typeId
- Type ID.public void writeAllMetadata(BinaryRawWriterEx writer)
writeAllMetadata
in interface PlatformContext
writer
- Writer.public void writeSchema(BinaryRawWriterEx writer, int typeId, int schemaId)
writeSchema
in interface PlatformContext
writer
- Writer.typeId
- Type ID.schemaId
- Schema ID.public PlatformContinuousQuery createContinuousQuery(long ptr, boolean hasFilter, @Nullable Object filter)
createContinuousQuery
in interface PlatformContext
ptr
- Pointer to continuous query deployed on the platform.hasFilter
- Whether filter exists.filter
- Filter.public PlatformContinuousQueryFilter createContinuousQueryFilter(Object filter)
createContinuousQueryFilter
in interface PlatformContext
filter
- Native filter.public PlatformMessageFilter createRemoteMessageFilter(Object filter, long ptr)
createRemoteMessageFilter
in interface PlatformContext
filter
- Native filter.ptr
- Pointer of deployed native filter.public boolean isEventTypeSupported(int evtTyp)
isEventTypeSupported
in interface PlatformContext
evtTyp
- Event type.True
if supported.public void writeEvent(BinaryRawWriterEx writer, Event evt)
writeEvent
in interface PlatformContext
writer
- Writer.evt
- Event.public PlatformEventFilterListener createLocalEventFilter(long hnd)
createLocalEventFilter
in interface PlatformContext
hnd
- Native handle.public PlatformEventFilterListener createRemoteEventFilter(Object pred, int... types)
createRemoteEventFilter
in interface PlatformContext
pred
- Native predicate.types
- Event types.public PlatformNativeException createNativeException(Object cause)
createNativeException
in interface PlatformContext
cause
- Native cause.public PlatformJob createJob(Object task, long ptr, @Nullable Object job)
createJob
in interface PlatformContext
task
- Task.ptr
- Pointer.job
- Native job.public PlatformJob createClosureJob(Object task, long ptr, Object job)
createClosureJob
in interface PlatformContext
task
- Native task.ptr
- Pointer.job
- Native job.public PlatformCacheEntryProcessor createCacheEntryProcessor(Object proc, long ptr)
createCacheEntryProcessor
in interface PlatformContext
proc
- Native processor.ptr
- Pointer.public PlatformCacheEntryFilter createCacheEntryFilter(Object filter, long ptr)
createCacheEntryFilter
in interface PlatformContext
filter
- Native filter.ptr
- Pointer.public PlatformStreamReceiver createStreamReceiver(Object rcv, long ptr, boolean keepBinary)
createStreamReceiver
in interface PlatformContext
rcv
- Native receiver.ptr
- Pointer.keepBinary
- Keep binary flag.public PlatformClusterNodeFilter createClusterNodeFilter(Object filter)
createClusterNodeFilter
in interface PlatformContext
filter
- Native filter.public String platform()
platform
in interface PlatformContext
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017