org.apache.ignite.internal.processors.platform

## Class PlatformAbstractTarget

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

All Implemented Interfaces:
  PlatformTarget

Direct Known Subclasses:
  PlatformAbstractQueryCursor, PlatformAffinity, PlatformAffinityFunctionTarget, PlatformAtomicLong, PlatformAtomicReference, PlatformAtomicSequence, PlatformBinaryProcessor, PlatformCache, PlatformCacheIterator, PlatformClusterGroup, PlatformCompute, PlatformContinuousQueryProxy, PlatformDataStreamer, PlatformEvents, PlatformListenableTarget, PlatformMessaging, PlatformServices, PlatformTransactions

    public abstract class PlatformAbstractTarget
    extends Object
    implements PlatformTarget

Abstract interop target.

### Field Summary

Fields
`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.

### Constructor Summary

Constructors
`protected` `PlatformAbstractTarget(PlatformContext platformCtx)` Constructor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Exception` `convertException(Exception e)` Convert caught exception.
`PlatformContext` `platformContext()`
`long` `processInLongOutLong(int type, long val)` Process IN operation.
`PlatformTarget` `processInObjectStreamOutObjectStream(int type, PlatformTarget arg, BinaryRawReaderEx reader, BinaryRawWriterEx writer)` Process IN-OUT operation.
`PlatformAsyncResult` `processInStreamAsync(int type, BinaryRawReaderEx reader)` Process asynchronous operation.
`long` `processInStreamOutLong(int type, BinaryRawReaderEx reader)` Process IN operation.
`long` `processInStreamOutLong(int type, BinaryRawReaderEx reader, PlatformMemory mem)` Process IN operation.
`PlatformTarget` `processInStreamOutObject(int type, BinaryRawReaderEx reader)` Process IN-OUT operation.
`void` `processInStreamOutStream(int type, BinaryRawReaderEx reader, BinaryRawWriterEx writer)` Process IN-OUT operation.
`PlatformTarget` `processOutObject(int type)` Process OUT operation.
`void` `processOutStream(int type, BinaryRawWriterEx writer)` Process OUT operation.
`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.
`static <T> T` `throwUnsupported(int type)` Throw an exception rendering unsupported operation type.
`protected PlatformTarget` `wrapListenable(PlatformListenable listenable)` Wraps a listenable to be returned to platform.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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:
  `convertException` in interface `PlatformTarget`
Parameters:
  `e` - Exception to convert.
Returns:
  Converted exception.

#### processInLongOutLong

    public long processInLongOutLong(int type,
                                     long val)
                              throws IgniteCheckedException

Process IN operation.

Specified by:
  `processInLongOutLong` in interface `PlatformTarget`
Parameters:
  `type` - Type.
  `val` - Value.
Returns:
  Result.
Throws:
  `IgniteCheckedException` - In case of exception.

#### processInStreamOutLong

    public long processInStreamOutLong(int type,
                                       BinaryRawReaderEx reader)
                                throws IgniteCheckedException

Process IN operation.

Specified by:
  `processInStreamOutLong` in interface `PlatformTarget`
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 IgniteCheckedException

Process IN operation.

Specified by:
  `processInStreamOutLong` in interface `PlatformTarget`
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 IgniteCheckedException

Process IN-OUT operation.

Specified by:
  `processInStreamOutStream` in interface `PlatformTarget`
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:
  `processInStreamOutObject` in interface `PlatformTarget`
Parameters:
  `type` - Type.
  `reader` - Binary reader.
Throws:
  `IgniteCheckedException` - In case of exception.

#### processInObjectStreamOutObjectStream

    public PlatformTarget processInObjectStreamOutObjectStream(int type,
                                                               @Nullable
                                                               PlatformTarget arg,
                                                               BinaryRawReaderEx reader,
                                                               BinaryRawWriterEx writer)
                                                        throws IgniteCheckedException

Process IN-OUT operation.

Specified by:
  `processInObjectStreamOutObjectStream` in interface `PlatformTarget`
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 IgniteCheckedException

Process OUT operation.

Specified by:
  `processOutStream` in interface `PlatformTarget`
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:
  `processOutObject` in interface `PlatformTarget`
Parameters:
  `type` - Type.
Throws:
  `IgniteCheckedException` - In case of exception.

#### processInStreamAsync

    public PlatformAsyncResult processInStreamAsync(int type,
                                                    BinaryRawReaderEx reader)
                                             throws IgniteCheckedException

Process asynchronous operation.

Specified by:
  `processInStreamAsync` in interface `PlatformTarget`
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 IgniteCheckedException

Throw 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.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019