public abstract class PlatformAbstractTarget extends Object implements PlatformTarget
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ERROR
Constant: ERROR.
|
protected static int |
FALSE
Constant: FALSE.
|
protected IgniteLogger |
log
Logger.
|
protected PlatformContext |
platformCtx
Context.
|
protected static int |
TRUE
Constant: TRUE.
|
| Modifier | Constructor and Description |
|---|---|
protected |
PlatformAbstractTarget(PlatformContext platformCtx)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Exception |
convertException(Exception e)
Convert caught exception.
|
protected IgniteInternalFuture |
currentFuture()
When overridden in a derived class, gets future for the current operation.
|
protected PlatformFutureUtils.Writer |
futureWriter(int opId)
When overridden in a derived class, gets a custom future writer.
|
long |
inLongOutLong(int type,
long val)
Operation accepting long value and returning long value.
|
Object |
inObjectStreamOutObjectStream(int type,
Object arg,
long inMemPtr,
long outMemPtr)
Operation accepting an object and a memory stream and returning result to another memory stream and an object.
|
long |
inStreamOutLong(int type,
long memPtr)
Operation accepting memory stream and returning long value.
|
Object |
inStreamOutObject(int type,
long memPtr)
Operation accepting memory stream and returning object.
|
void |
inStreamOutStream(int type,
long inMemPtr,
long outMemPtr)
Operation accepting one memory stream and returning result to another memory stream.
|
void |
listenFuture(long futId,
int typ)
Start listening for the future.
|
void |
listenFutureForOperation(long futId,
int typ,
int opId)
Start listening for the future for specific operation type.
|
Object |
outObject(int type)
Operation returning object result.
|
void |
outStream(int type,
long memPtr)
Operation returning result to memory stream.
|
PlatformContext |
platformContext() |
protected long |
processInLongOutLong(int type,
long val)
Process IN operation.
|
protected Object |
processInObjectStreamOutObjectStream(int type,
Object arg,
BinaryRawReaderEx reader,
BinaryRawWriterEx writer)
Process IN-OUT operation.
|
protected long |
processInStreamOutLong(int type,
BinaryRawReaderEx reader)
Process IN operation.
|
protected long |
processInStreamOutLong(int type,
BinaryRawReaderEx reader,
PlatformMemory mem)
Process IN operation.
|
protected Object |
processInStreamOutObject(int type,
BinaryRawReaderEx reader)
Process IN operation with managed object as result.
|
protected void |
processInStreamOutStream(int type,
BinaryRawReaderEx reader,
BinaryRawWriterEx writer)
Process IN-OUT operation.
|
protected Object |
processOutObject(int type)
Process OUT operation.
|
protected void |
processOutStream(int type,
BinaryRawWriterEx writer)
Process OUT operation.
|
protected long |
readAndListenFuture(BinaryRawReader reader)
Reads future information and listens.
|
protected PlatformListenable |
readAndListenFuture(BinaryRawReader reader,
IgniteFuture fut)
Reads future information and listens.
|
protected PlatformListenable |
readAndListenFuture(BinaryRawReader reader,
IgniteFuture fut,
PlatformFutureUtils.Writer writer)
Reads future information and listens.
|
protected PlatformListenable |
readAndListenFuture(BinaryRawReader reader,
IgniteInternalFuture fut)
Reads future information and listens.
|
protected PlatformListenable |
readAndListenFuture(BinaryRawReader reader,
IgniteInternalFuture fut,
PlatformFutureUtils.Writer writer)
Reads future information and listens.
|
protected <T> T |
throwUnsupported(int type)
Throw an exception rendering unsupported operation type.
|
protected static final int TRUE
protected static final int FALSE
protected static final int ERROR
protected final PlatformContext platformCtx
protected final IgniteLogger log
protected PlatformAbstractTarget(PlatformContext platformCtx)
platformCtx - Context.public long inLongOutLong(int type,
long val)
throws Exception
inLongOutLong in interface PlatformTargettype - Operation type.val - Value.Exception - If case of failure.public long inStreamOutLong(int type,
long memPtr)
throws Exception
inStreamOutLong in interface PlatformTargettype - Operation type.memPtr - Memory pointer.Exception - If case of failure.public Object inStreamOutObject(int type, long memPtr) throws Exception
inStreamOutObject in interface PlatformTargettype - Operation type.memPtr - Memory pointer.Exception - If case of failure.public void outStream(int type,
long memPtr)
throws Exception
outStream in interface PlatformTargettype - Operation type.memPtr - Memory pointer.Exception - In case of failure.public Object outObject(int type) throws Exception
outObject in interface PlatformTargettype - Operation type.Exception - If failed.public void inStreamOutStream(int type,
long inMemPtr,
long outMemPtr)
throws Exception
inStreamOutStream in interface PlatformTargettype - Operation type.inMemPtr - Input memory pointer.outMemPtr - Output memory pointer.Exception - In case of failure.public Object inObjectStreamOutObjectStream(int type, Object arg, long inMemPtr, long outMemPtr) throws Exception
inObjectStreamOutObjectStream in interface PlatformTargettype - Operation type.arg - Argument (optional).inMemPtr - Input memory pointer.outMemPtr - Output memory pointer.Exception - In case of failure.public Exception convertException(Exception e)
e - Exception to convert.public PlatformContext platformContext()
public void listenFuture(long futId,
int typ)
throws Exception
listenFuture in interface PlatformTargetfutId - Future ID.typ - Result type.IgniteCheckedException - In case of failure.Exceptionpublic void listenFutureForOperation(long futId,
int typ,
int opId)
throws Exception
listenFutureForOperation in interface PlatformTargetfutId - Future ID.typ - Result type.opId - Operation ID required to pick correct result writer.IgniteCheckedException - In case of failure.Exceptionprotected IgniteInternalFuture currentFuture() throws IgniteCheckedException
IgniteCheckedException - If failed.@Nullable protected PlatformFutureUtils.Writer futureWriter(int opId)
opId - Operation id.protected long processInLongOutLong(int type,
long val)
throws IgniteCheckedException
type - Type.val - Value.IgniteCheckedException - In case of exception.protected long processInStreamOutLong(int type,
BinaryRawReaderEx reader)
throws IgniteCheckedException
type - Type.reader - Binary reader.IgniteCheckedException - In case of exception.protected long processInStreamOutLong(int type,
BinaryRawReaderEx reader,
PlatformMemory mem)
throws IgniteCheckedException
type - Type.reader - Binary reader.IgniteCheckedException - In case of exception.protected void processInStreamOutStream(int type,
BinaryRawReaderEx reader,
BinaryRawWriterEx writer)
throws IgniteCheckedException
type - Type.reader - Binary reader.writer - Binary writer.IgniteCheckedException - In case of exception.protected Object processInStreamOutObject(int type, BinaryRawReaderEx reader) throws IgniteCheckedException
type - Type.reader - Binary reader.IgniteCheckedException - In case of exception.protected Object processInObjectStreamOutObjectStream(int type, @Nullable Object arg, BinaryRawReaderEx reader, BinaryRawWriterEx writer) throws IgniteCheckedException
type - Type.arg - Argument.reader - Binary reader.writer - Binary writer.IgniteCheckedException - In case of exception.protected void processOutStream(int type,
BinaryRawWriterEx writer)
throws IgniteCheckedException
type - Type.writer - Binary writer.IgniteCheckedException - In case of exception.protected Object processOutObject(int type) throws IgniteCheckedException
type - Type.IgniteCheckedException - In case of exception.protected <T> T throwUnsupported(int type)
throws IgniteCheckedException
type - Operation type.IgniteCheckedException - Exception to be thrown.protected PlatformListenable readAndListenFuture(BinaryRawReader reader, IgniteInternalFuture fut, PlatformFutureUtils.Writer writer) throws IgniteCheckedException
reader - Reader.fut - Future.writer - Writer.IgniteCheckedException - In case of error.protected PlatformListenable readAndListenFuture(BinaryRawReader reader, IgniteFuture fut, PlatformFutureUtils.Writer writer) throws IgniteCheckedException
reader - Reader.fut - Future.writer - Writer.IgniteCheckedException - In case of error.protected PlatformListenable readAndListenFuture(BinaryRawReader reader, IgniteInternalFuture fut) throws IgniteCheckedException
reader - Reader.fut - Future.IgniteCheckedException - In case of error.protected PlatformListenable readAndListenFuture(BinaryRawReader reader, IgniteFuture fut) throws IgniteCheckedException
reader - Reader.fut - Future.IgniteCheckedException - In case of error.protected long readAndListenFuture(BinaryRawReader reader) throws IgniteCheckedException
reader - Reader.IgniteCheckedException - In case of error.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.8.0 Release Date : December 5 2016