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

## Class PlatformAbstractFunc

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

All Implemented Interfaces:
  `Serializable`, `PlatformSecurityAwareJob`

Direct Known Subclasses:
  `PlatformCallable`, `PlatformRunnable`

    public abstract class PlatformAbstractFunc
    extends Object
    implements PlatformSecurityAwareJob, Serializable

Base class for simple computations (Callable, Runnable). Cleaner alternative to `PlatformClosureJob`, uses less wrapping for the underlying object, and a single callback.

See Also:
  Serialized Form

### Field Summary

Fields
`protected Ignite` `ignite` Ignite instance.

### Constructor Summary

Constructors
`protected` `PlatformAbstractFunc​(Object func, long ptr, String funcName)` Constructor.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected Object` `invoke()` Invokes this instance.
`String` `name()`
`protected abstract void` `platformCallback​(PlatformCallbackGateway gate, long memPtr)` Performs platform callback.

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

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

### Field Detail

#### ignite

    @IgniteInstanceResource
    protected transient Ignite ignite

Ignite instance.

### Constructor Detail

#### PlatformAbstractFunc

    protected PlatformAbstractFunc​(Object func,
                                   long ptr,
                                   String funcName)

Constructor.

Parameters:
  `func` - Platform func.
  `ptr` - Handle for local execution.
  `funcName` - Platform function name.

### Method Detail

#### invoke

    protected Object invoke()
                     throws IgniteCheckedException

Invokes this instance.

Returns:
  Invocation result.
Throws:
  `IgniteCheckedException`

#### name

    public String name()

Specified by:
  `name` in interface `PlatformSecurityAwareJob`
Returns:
  The name of the Platform Compute Job that will be used when authorizing its start and cancellation.

#### platformCallback

    protected abstract void platformCallback​(PlatformCallbackGateway gate,
                                             long memPtr)

Performs platform callback.

Parameters:
  `gate` - Gateway.
  `memPtr` - Pointer.