org.apache.ignite.internal.processors.platform.compute

## Class PlatformCompute

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

All Implemented Interfaces:
  PlatformTarget

    public class PlatformCompute
    extends PlatformAbstractTarget

Interop compute.

### Nested Class Summary

Nested Classes
`protected class` `PlatformCompute.ComputeConvertingFuture` Wraps ComputeTaskFuture as IgniteInternalFuture.

### Field Summary

Fields
`protected ThreadLocal<IgniteInternalFuture>` `curFut` Future for previous asynchronous operation.

### Fields inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`FALSE, log, platformCtx, TRUE`

### Constructor Summary

Constructors
Constructor and Description
`PlatformCompute(PlatformContext platformCtx, ClusterGroup grp, String platformAttr)` Constructor.

### Method Summary

Methods
`protected IgniteCompute` `computeForTask(Collection<UUID> nodeIds)` Get compute object for the given node IDs.
`protected IgniteInternalFuture` `currentFuture()` <inheritDoc />
`protected Object` `executeJavaTask(BinaryRawReaderEx reader, boolean async)` Execute task taking arguments from the given reader.
`PlatformListenable` `executeNative(long taskPtr, long topVer)` Execute native full-fledged task.
`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 Collection<UUID>` `readNodeIds(BinaryRawReaderEx reader)` Read node IDs.
`void` `withNoFailover()` Set "withNoFailover" state.
`void` `withTimeout(long timeout)` Set "withTimeout" state.

### Methods inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`convertException, futureWriter, inObjectStreamOutStream, inStreamOutLong, inStreamOutObject, inStreamOutStream, listenFuture, listenFutureAndGet, listenFutureForOperation, listenFutureForOperationAndGet, outLong, outObject, outStream, platformContext, processInObjectStreamOutStream, processInStreamOutLong, processOutLong, processOutObject, processOutStream, throwUnsupported`

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

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

### Field Detail

#### curFut

    protected ThreadLocal<IgniteInternalFuture> curFut

Future for previous asynchronous operation.

### Constructor Detail

#### PlatformCompute

    public PlatformCompute(PlatformContext platformCtx,
                   ClusterGroup grp,
                   String platformAttr)

Constructor.

Parameters:
  `platformCtx` - Context.
  `grp` - Cluster group.

### Method Detail

#### processInStreamOutObject

    protected Object processInStreamOutObject(int type,
                                  BinaryRawReaderEx reader)
                                       throws IgniteCheckedException

Process IN operation with managed object as result.

Overrides:
  `processInStreamOutObject` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `reader` - Binary reader.
Returns:
  Result.
Throws:
  `IgniteCheckedException` - In case of exception.

#### processInStreamOutStream

    protected void processInStreamOutStream(int type,
                                BinaryRawReaderEx reader,
                                BinaryRawWriterEx writer)
                                     throws IgniteCheckedException

Process IN-OUT operation.

Overrides:
  `processInStreamOutStream` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `reader` - Binary reader.
  `writer` - Binary writer.
Throws:
  `IgniteCheckedException` - In case of exception.

#### executeNative

    public PlatformListenable executeNative(long taskPtr,
                                   long topVer)

Execute native full-fledged task.

Parameters:
  `taskPtr` - Pointer to the task.
  `topVer` - Topology version.

#### withTimeout

    public void withTimeout(long timeout)

Set "withTimeout" state.

Parameters:
  `timeout` - Timeout (milliseconds).

#### withNoFailover

    public void withNoFailover()

Set "withNoFailover" state.

#### currentFuture

    protected IgniteInternalFuture currentFuture()
                                          throws IgniteCheckedException

<inheritDoc />

Overrides:
  `currentFuture` in class `PlatformAbstractTarget`
Returns:
  current future.
Throws:
  `IgniteCheckedException`

#### executeJavaTask

    protected Object executeJavaTask(BinaryRawReaderEx reader,
                         boolean async)

Execute task taking arguments from the given reader.

Parameters:
  `reader` - Reader.
Returns:
  Task result.

#### readNodeIds

    protected Collection<UUID> readNodeIds(BinaryRawReaderEx reader)

Read node IDs.

Parameters:
  `reader` - Reader.
Returns:
  Node IDs.

#### computeForTask

    protected IgniteCompute computeForTask(Collection<UUID> nodeIds)

Get compute object for the given node IDs.

Parameters:
  `nodeIds` - Node IDs.
Returns:
  Compute object.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.6.0
Release Date | : May 18 2016