org.apache.ignite.internal.util.worker

## Class GridWorkerFuture<T>

- java.lang.Object
- - java.util.concurrent.locks.AbstractOwnableSynchronizer
  - - java.util.concurrent.locks.AbstractQueuedSynchronizer
    - - org.apache.ignite.internal.util.future.GridFutureAdapter<T>
      - - org.apache.ignite.internal.util.worker.GridWorkerFuture<T>

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<T>

    public class GridWorkerFuture<T>
    extends GridFutureAdapter<T>

Future for locally executed closure that defines cancellation logic.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

`AbstractQueuedSynchronizer.ConditionObject`

### Constructor Summary

Constructors
Constructor and Description
`GridWorkerFuture()`

### Method Summary

Methods
`boolean` `cancel()` Default no-op implementation that always returns `false`.
`void` `setWorker(GridWorker w)`

### Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter

`chain, duration, endTime, error, get, get, get, get0, ignoreInterrupts, isCancelled, isDone, isFailed, listen, onCancelled, onDone, onDone, onDone, onDone, result, startTime, toString, tryAcquireShared, tryReleaseShared`

### Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

`acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryRelease`

### Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer

`getExclusiveOwnerThread, setExclusiveOwnerThread`

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

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

### Constructor Detail

#### GridWorkerFuture

    public GridWorkerFuture()

### Method Detail

#### cancel

    public boolean cancel()
                   throws IgniteCheckedException

Default no-op implementation that always returns `false`. Futures that do support cancellation should override this method and call `GridFutureAdapter.onCancelled()` callback explicitly if cancellation indeed did happen.

Specified by:
  `cancel` in interface `IgniteInternalFuture<T>`
Overrides:
  `cancel` in class `GridFutureAdapter<T>`
Returns:
  `True` if future was canceled (i.e. was not finished prior to this call).
Throws:
  `IgniteCheckedException` - If cancellation failed.

#### setWorker

    public void setWorker(GridWorker w)

Parameters:
  `w` - Worker.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.1.0-incubating
Release Date | : May 20 2015