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

    public class PlatformProcessorImpl
    extends GridProcessorAdapter
    implements PlatformProcessor

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`

### Constructor Summary

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

### Method Summary

Methods
`PlatformTarget` `affinity(String name)` Get affinity.
`PlatformTarget` `atomicLong(String name, long initVal, boolean create)` Get or create AtomicLong.
`void` `awaitStart()` Await until platform processor is safe to use (i.e.
`PlatformTarget` `cache(String name)` Get cache.
`PlatformTarget` `compute(PlatformTarget grp)` Create interop compute.
`PlatformContext` `context()` Gets platform context.
`PlatformTarget` `createCache(String name)` Create cache.
`PlatformTarget` `dataStreamer(String cacheName, boolean keepBinary)` Get data streamer.
`long` `environmentPointer()` Get environment pointer associated with this processor.
`PlatformTarget` `events(PlatformTarget grp)` Create interop events.
`PlatformTarget` `extensions()` Get platform extensions.
`PlatformTarget` `getOrCreateCache(String name)` Get or create cache.
`Ignite` `ignite()` Gets owning Ignite instance.
`PlatformTarget` `message(PlatformTarget grp)` Create interop messaging.
`void` `onKernalStop(boolean cancel)` Callback to notify that kernal is about to stop.
`PlatformTarget` `projection()` Get projection.
`void` `registerStore(PlatformCacheStore store, boolean convertBinary)` Register cache store.
`void` `releaseStart()` Notify processor that it is safe to use.
`PlatformTarget` `services(PlatformTarget grp)` Create interop services.
`void` `start()` Starts grid component.
`void` `stop(boolean cancel)` Stops grid component.
`PlatformTarget` `transactions()` Get transactions.

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

`assertParameter, collectDiscoveryData, discoveryDataType, onDisconnected, onDiscoveryDataReceived, onKernalStart, onReconnected, printMemoryStats, toString, 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

`collectDiscoveryData, discoveryDataType, onDisconnected, onDiscoveryDataReceived, onKernalStart, onReconnected, printMemoryStats, 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.

#### cache

    public PlatformTarget cache(@Nullable
                       String name)
                         throws IgniteCheckedException

Get cache.

Specified by:
  `cache` in interface `PlatformProcessor`
Parameters:
  `name` - Cache name.
Returns:
  Cache.
Throws:
  `IgniteCheckedException` - If failed.

#### createCache

    public PlatformTarget createCache(@Nullable
                             String name)
                               throws IgniteCheckedException

Create cache.

Specified by:
  `createCache` in interface `PlatformProcessor`
Parameters:
  `name` - Cache name.
Returns:
  Cache.
Throws:
  `IgniteCheckedException` - If failed.

#### getOrCreateCache

    public PlatformTarget getOrCreateCache(@Nullable
                                  String name)
                                    throws IgniteCheckedException

Get or create cache.

Specified by:
  `getOrCreateCache` in interface `PlatformProcessor`
Parameters:
  `name` - Cache name.
Returns:
  Cache.
Throws:
  `IgniteCheckedException` - If failed.

#### affinity

    public PlatformTarget affinity(@Nullable
                          String name)
                            throws IgniteCheckedException

Get affinity.

Specified by:
  `affinity` in interface `PlatformProcessor`
Parameters:
  `name` - Cache name.
Returns:
  Affinity.
Throws:
  `IgniteCheckedException` - If failed.

#### dataStreamer

    public PlatformTarget dataStreamer(@Nullable
                              String cacheName,
                              boolean keepBinary)
                                throws IgniteCheckedException

Get data streamer.

Specified by:
  `dataStreamer` in interface `PlatformProcessor`
Parameters:
  `cacheName` - Cache name.
  `keepBinary` - Binary flag.
Returns:
  Data streamer.
Throws:
  `IgniteCheckedException` - If failed.

#### transactions

    public PlatformTarget transactions()

Get transactions.

Specified by:
  `transactions` in interface `PlatformProcessor`
Returns:
  Transactions.

#### projection

    public PlatformTarget projection()
                              throws IgniteCheckedException

Get projection.

Specified by:
  `projection` in interface `PlatformProcessor`
Returns:
  Projection.
Throws:
  `IgniteCheckedException` - If failed.

#### compute

    public PlatformTarget compute(PlatformTarget grp)

Create interop compute.

Specified by:
  `compute` in interface `PlatformProcessor`
Parameters:
  `grp` - Cluster group.
Returns:
  Compute instance.

#### message

    public PlatformTarget message(PlatformTarget grp)

Create interop messaging.

Specified by:
  `message` in interface `PlatformProcessor`
Parameters:
  `grp` - Cluster group.
Returns:
  Messaging instance.

#### events

    public PlatformTarget events(PlatformTarget grp)

Create interop events.

Specified by:
  `events` in interface `PlatformProcessor`
Parameters:
  `grp` - Cluster group.
Returns:
  Events instance.

#### services

    public PlatformTarget services(PlatformTarget grp)

Create interop services.

Specified by:
  `services` in interface `PlatformProcessor`
Parameters:
  `grp` - Cluster group.
Returns:
  Services instance.

#### extensions

    public PlatformTarget extensions()

Get platform extensions. Override this method to provide any additional targets and operations you need.

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

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

#### atomicLong

    public PlatformTarget atomicLong(String name,
                            long initVal,
                            boolean create)
                              throws IgniteException

Get or create AtomicLong.

Specified by:
  `atomicLong` in interface `PlatformProcessor`
Parameters:
  `name` - Name.
  `initVal` - Initial value.
  `create` - Create flag.
Returns:
  Platform atomic long.
Throws:
  `IgniteException`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0.final
Release Date | : December 29 2015