org.apache.ignite.internal.processors.platform

## Class PlatformProcessorImpl

- java.lang.Object
- - org.apache.ignite.internal.processors.GridProcessorAdapter
  - - org.apache.ignite.internal.processors.platform.PlatformProcessorImpl

All Implemented Interfaces:
  GridComponent, GridProcessor, PlatformProcessor, PlatformTarget

    public class PlatformProcessorImpl
    extends GridProcessorAdapter
    implements PlatformProcessor, PlatformTarget

GridGain platform processor.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`ctx, diagnosticLog`

### Constructor Summary

Constructors
Constructor and Description
`PlatformProcessorImpl(GridKernalContext ctx)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `awaitStart()` Await until platform processor is safe to use (i.e.
`PlatformContext` `context()` Gets platform context.
`Exception` `convertException(Exception e)` Convert caught exception.
`long` `environmentPointer()` Get environment pointer associated with this processor.
`Ignite` `ignite()` Gets owning Ignite instance.
`void` `onDisconnected(IgniteFuture<?> reconnectFut)` Client disconnected callback.
`void` `onKernalStop(boolean cancel)` Callback to notify that kernal is about to stop.
`IgniteInternalFuture<?>` `onReconnected(boolean clusterRestarted)` Client reconnected callback.
`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.
`void` `registerStore(PlatformCacheStore store, boolean convertBinary)` Register cache store.
`void` `releaseStart()` Notify processor that it is safe to use.
`void` `start()` Starts grid component.
`void` `stop(boolean cancel)` Stops grid component.

### Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, printMemoryStats, toString, validateNode, validateNode`

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

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

### Methods inherited from interface org.apache.ignite.internal.GridComponent

`collectGridNodeData, collectJoiningNodeData, discoveryDataType, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, printMemoryStats, validateNode, validateNode`

### Constructor Detail

#### PlatformProcessorImpl

    public PlatformProcessorImpl(GridKernalContext ctx)

Constructor.

Parameters:
  `ctx` - Kernal context.

### Method Detail

#### start

    public void start()
               throws IgniteCheckedException

Starts grid component.

Specified by:
  `start` in interface `GridComponent`
Overrides:
  `start` in class `GridProcessorAdapter`
Throws:
  `IgniteCheckedException` - Throws in case of any errors.

#### onKernalStop

    public void onKernalStop(boolean cancel)

Callback to notify that kernal is about to stop.

Specified by:
  `onKernalStop` in interface `GridComponent`
Overrides:
  `onKernalStop` in class `GridProcessorAdapter`
Parameters:
  `cancel` - Flag indicating whether jobs should be canceled.

#### stop

    public void stop(boolean cancel)
              throws IgniteCheckedException

Stops grid component.

Specified by:
  `stop` in interface `GridComponent`
Overrides:
  `stop` in class `GridProcessorAdapter`
Parameters:
  `cancel` - If `true`, then all ongoing tasks or jobs for relevant components need to be cancelled.
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### ignite

    public Ignite ignite()

Gets owning Ignite instance.

Specified by:
  `ignite` in interface `PlatformProcessor`
Returns:
  Ignite instance.

#### environmentPointer

    public long environmentPointer()

Get environment pointer associated with this processor.

Specified by:
  `environmentPointer` in interface `PlatformProcessor`
Returns:
  Environment pointer.

#### releaseStart

    public void releaseStart()

Notify processor that it is safe to use.

Specified by:
  `releaseStart` in interface `PlatformProcessor`

#### awaitStart

    public void awaitStart()
                    throws IgniteCheckedException

Await until platform processor is safe to use (i.e. `has been called`.

Specified by:
  `awaitStart` in interface `PlatformProcessor`
Throws:
  `IgniteCheckedException` - If failed.

#### context

    public PlatformContext context()

Gets platform context.

Specified by:
  `context` in interface `PlatformProcessor`
Returns:
  Platform context.

#### registerStore

    public void registerStore(PlatformCacheStore store,
                              boolean convertBinary)
                       throws IgniteCheckedException

Register cache store.

Specified by:
  `registerStore` in interface `PlatformProcessor`
Parameters:
  `store` - Store.
  `convertBinary` - Convert binary flag.
Throws:
  `IgniteCheckedException` - If failed.

#### onDisconnected

    public void onDisconnected(IgniteFuture<?> reconnectFut)
                        throws IgniteCheckedException

Client disconnected callback.

Specified by:
  `onDisconnected` in interface `GridComponent`
Overrides:
  `onDisconnected` in class `GridProcessorAdapter`
Parameters:
  `reconnectFut` - Reconnect future.
Throws:
  `IgniteCheckedException` - If failed.

#### onReconnected

    public IgniteInternalFuture<?> onReconnected(boolean clusterRestarted)
                                          throws IgniteCheckedException

Client reconnected callback.

Specified by:
  `onReconnected` in interface `GridComponent`
Overrides:
  `onReconnected` in class `GridProcessorAdapter`
Parameters:
  `clusterRestarted` - Cluster restarted flag.
Returns:
  Future to wait before completing reconnect future.
Throws:
  `IgniteCheckedException` - If failed.

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

#### convertException

    public Exception convertException(Exception e)

Convert caught exception.

Specified by:
  `convertException` in interface `PlatformTarget`
Parameters:
  `e` - Exception to convert.
Returns:
  Converted exception.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018