public abstract class PlatformAbstractTarget extends Object implements PlatformTarget
| Modifier and Type | Field and Description |
|---|---|
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.
|
void |
inObjectStreamOutStream(int type,
Object arg,
long inMemPtr,
long outMemPtr)
Operation accepting an object and a memory stream and returning result to another memory stream.
|
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.
|
PlatformListenable |
listenFutureAndGet(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.
|
PlatformListenable |
listenFutureForOperationAndGet(long futId,
int typ,
int opId)
Start listening for the future for specific operation type.
|
long |
outLong(int type)
Operation returning long result.
|
Object |
outObject(int type)
Operation returning object result.
|
void |
outStream(int type,
long memPtr)
Operation returning result to memory stream.
|
PlatformContext |
platformContext() |
protected void |
processInObjectStreamOutStream(int type,
Object arg,
BinaryRawReaderEx reader,
BinaryRawWriterEx writer)
Process IN-OUT operation.
|
protected long |
processInStreamOutLong(int type,
BinaryRawReaderEx reader)
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 long |
processOutLong(int type)
Process OUT operation.
|
protected Object |
processOutObject(int type)
Process OUT operation.
|
protected void |
processOutStream(int type,
BinaryRawWriterEx writer)
Process OUT operation.
|
protected <T> T |
throwUnsupported(int type)
Throw an exception rendering unsupported operation type.
|
protected static final int TRUE
protected static final int FALSE
protected final PlatformContext platformCtx
protected final IgniteLogger log
protected PlatformAbstractTarget(PlatformContext platformCtx)
platformCtx - Context.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 long outLong(int type)
throws Exception
outLong in interface PlatformTargettype - Operation type.Exception - In 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 void inObjectStreamOutStream(int type,
Object arg,
long inMemPtr,
long outMemPtr)
throws Exception
inObjectStreamOutStream 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.Exceptionpublic PlatformListenable listenFutureAndGet(long futId, int typ) throws Exception
listenFutureAndGet in interface PlatformTargetfutId - Future ID.typ - Result type.IgniteCheckedException - In case of failure.Exceptionpublic PlatformListenable listenFutureForOperationAndGet(long futId, int typ, int opId) throws Exception
listenFutureForOperationAndGet 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@Nullable protected PlatformFutureUtils.Writer futureWriter(int opId)
opId - Operation id.protected long processInStreamOutLong(int type,
BinaryRawReaderEx reader)
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 void processInObjectStreamOutStream(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 long processOutLong(int type)
throws IgniteCheckedException
type - Type.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.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.7.0 Release Date : August 1 2016