Class PlatformAbstractTarget
- java.lang.Object
-
- org.apache.ignite.internal.processors.platform.PlatformAbstractTarget
-
- All Implemented Interfaces:
PlatformTarget
- Direct Known Subclasses:
PlatformAbstractQueryCursor,PlatformAffinity,PlatformAffinityFunctionTarget,PlatformAffinityManager,PlatformAtomicLong,PlatformAtomicReference,PlatformAtomicSequence,PlatformBinaryProcessor,PlatformCache,PlatformCacheIterator,PlatformClusterGroup,PlatformCompute,PlatformComputeTaskSession,PlatformContinuousQueryProxy,PlatformDataStreamer,PlatformEvents,PlatformListenableTarget,PlatformMessaging,PlatformServices,PlatformTransactions
public abstract class PlatformAbstractTarget extends Object implements PlatformTarget
Abstract interop target.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intERRORConstant: ERROR.protected static intFALSEConstant: FALSE.protected IgniteLoggerlogLogger.protected PlatformContextplatformCtxContext.protected static intTRUEConstant: TRUE.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPlatformAbstractTarget(PlatformContext platformCtx)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ExceptionconvertException(Exception e)Convert caught exception.PlatformContextplatformContext()longprocessInLongOutLong(int type, long val)Process IN operation.PlatformTargetprocessInObjectStreamOutObjectStream(int type, @Nullable PlatformTarget arg, BinaryRawReaderEx reader, BinaryRawWriterEx writer)Process IN-OUT operation.PlatformAsyncResultprocessInStreamAsync(int type, BinaryRawReaderEx reader)Process asynchronous operation.longprocessInStreamOutLong(int type, BinaryRawReaderEx reader)Process IN operation.longprocessInStreamOutLong(int type, BinaryRawReaderEx reader, PlatformMemory mem)Process IN operation.PlatformTargetprocessInStreamOutObject(int type, BinaryRawReaderEx reader)Process IN-OUT operation.voidprocessInStreamOutStream(int type, BinaryRawReaderEx reader, BinaryRawWriterEx writer)Process IN-OUT operation.PlatformTargetprocessOutObject(int type)Process OUT operation.voidprocessOutStream(int type, BinaryRawWriterEx writer)Process OUT operation.protected PlatformListenablereadAndListenFuture(BinaryRawReader reader, IgniteInternalFuture fut)Reads future information and listens.protected PlatformListenablereadAndListenFuture(BinaryRawReader reader, IgniteFuture fut)Reads future information and listens.protected PlatformListenablereadAndListenFuture(BinaryRawReader reader, IgniteFuture fut, PlatformFutureUtils.Writer writer)Reads future information and listens.static <T> TthrowUnsupported(int type)Throw an exception rendering unsupported operation type.protected PlatformTargetwrapListenable(PlatformListenable listenable)Wraps a listenable to be returned to platform.
-
-
-
Field Detail
-
TRUE
protected static final int TRUE
Constant: TRUE.- See Also:
- Constant Field Values
-
FALSE
protected static final int FALSE
Constant: FALSE.- See Also:
- Constant Field Values
-
ERROR
protected static final int ERROR
Constant: ERROR.- See Also:
- Constant Field Values
-
platformCtx
protected final PlatformContext platformCtx
Context.
-
log
protected final IgniteLogger log
Logger.
-
-
Constructor Detail
-
PlatformAbstractTarget
protected PlatformAbstractTarget(PlatformContext platformCtx)
Constructor.- Parameters:
platformCtx- Context.
-
-
Method Detail
-
platformContext
public PlatformContext platformContext()
- Returns:
- Context.
-
convertException
public Exception convertException(Exception e)
Convert caught exception.- Specified by:
convertExceptionin interfacePlatformTarget- Parameters:
e- Exception to convert.- Returns:
- Converted exception.
-
processInLongOutLong
public long processInLongOutLong(int type, long val) throws IgniteCheckedExceptionProcess IN operation.- Specified by:
processInLongOutLongin interfacePlatformTarget- Parameters:
type- Type.val- Value.- Returns:
- Result.
- Throws:
IgniteCheckedException- In case of exception.
-
processInStreamOutLong
public long processInStreamOutLong(int type, BinaryRawReaderEx reader) throws IgniteCheckedExceptionProcess IN operation.- Specified by:
processInStreamOutLongin interfacePlatformTarget- Parameters:
type- Type.reader- Binary reader.- Returns:
- Result.
- Throws:
IgniteCheckedException- In case of exception.
-
processInStreamOutLong
public long processInStreamOutLong(int type, BinaryRawReaderEx reader, PlatformMemory mem) throws IgniteCheckedExceptionProcess IN operation.- Specified by:
processInStreamOutLongin interfacePlatformTarget- Parameters:
type- Type.reader- Binary reader.- Returns:
- Result.
- Throws:
IgniteCheckedException- In case of exception.
-
processInStreamOutStream
public void processInStreamOutStream(int type, BinaryRawReaderEx reader, BinaryRawWriterEx writer) throws IgniteCheckedExceptionProcess IN-OUT operation.- Specified by:
processInStreamOutStreamin interfacePlatformTarget- Parameters:
type- Type.reader- Binary reader.writer- Binary writer.- Throws:
IgniteCheckedException- In case of exception.
-
processInStreamOutObject
public PlatformTarget processInStreamOutObject(int type, BinaryRawReaderEx reader) throws IgniteCheckedException
Process IN-OUT operation.- Specified by:
processInStreamOutObjectin interfacePlatformTarget- Parameters:
type- Type.reader- Binary reader.- Throws:
IgniteCheckedException- In case of exception.
-
processInObjectStreamOutObjectStream
public PlatformTarget processInObjectStreamOutObjectStream(int type, @Nullable @Nullable PlatformTarget arg, BinaryRawReaderEx reader, BinaryRawWriterEx writer) throws IgniteCheckedException
Process IN-OUT operation.- Specified by:
processInObjectStreamOutObjectStreamin interfacePlatformTarget- Parameters:
type- Type.arg- Argument.reader- Binary reader.writer- Binary writer.- Throws:
IgniteCheckedException- In case of exception.
-
processOutStream
public void processOutStream(int type, BinaryRawWriterEx writer) throws IgniteCheckedExceptionProcess OUT operation.- Specified by:
processOutStreamin interfacePlatformTarget- Parameters:
type- Type.writer- Binary writer.- Throws:
IgniteCheckedException- In case of exception.
-
processOutObject
public PlatformTarget processOutObject(int type) throws IgniteCheckedException
Process OUT operation.- Specified by:
processOutObjectin interfacePlatformTarget- Parameters:
type- Type.- Throws:
IgniteCheckedException- In case of exception.
-
processInStreamAsync
public PlatformAsyncResult processInStreamAsync(int type, BinaryRawReaderEx reader) throws IgniteCheckedException
Process asynchronous operation.- Specified by:
processInStreamAsyncin interfacePlatformTarget- Parameters:
type- Type.reader- Binary reader.- Returns:
- Async result (should not be null).
- Throws:
IgniteCheckedException- In case of exception.
-
throwUnsupported
public static <T> T throwUnsupported(int type) throws IgniteCheckedExceptionThrow an exception rendering unsupported operation type.- Parameters:
type- Operation type.- Returns:
- Dummy value which is never returned.
- Throws:
IgniteCheckedException- Exception to be thrown.
-
readAndListenFuture
protected PlatformListenable readAndListenFuture(BinaryRawReader reader, IgniteFuture fut, PlatformFutureUtils.Writer writer) throws IgniteCheckedException
Reads future information and listens.- Parameters:
reader- Reader.fut- Future.writer- Writer.- Throws:
IgniteCheckedException- In case of error.
-
readAndListenFuture
protected PlatformListenable readAndListenFuture(BinaryRawReader reader, IgniteInternalFuture fut) throws IgniteCheckedException
Reads future information and listens.- Parameters:
reader- Reader.fut- Future.- Throws:
IgniteCheckedException- In case of error.
-
readAndListenFuture
protected PlatformListenable readAndListenFuture(BinaryRawReader reader, IgniteFuture fut) throws IgniteCheckedException
Reads future information and listens.- Parameters:
reader- Reader.fut- Future.- Throws:
IgniteCheckedException- In case of error.
-
wrapListenable
protected PlatformTarget wrapListenable(PlatformListenable listenable)
Wraps a listenable to be returned to platform.- Parameters:
listenable- Listenable.- Returns:
- Target.
-
-