org.apache.ignite.internal.processors.cache.distributed.dht.atomic

## Class GridNearAtomicUpdateFuture

- java.lang.Object
- - java.util.concurrent.locks.AbstractOwnableSynchronizer
  - - java.util.concurrent.locks.AbstractQueuedSynchronizer
    - - org.apache.ignite.internal.util.future.GridFutureAdapter<Object>
      - - org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<Object>, GridCacheAtomicFuture<Object>, GridCacheFuture<Object>

    public class GridNearAtomicUpdateFuture
    extends GridFutureAdapter<Object>
    implements GridCacheAtomicFuture<Object>

DHT atomic cache near update future.

See Also:
  Serialized Form

### Nested Class Summary

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

`AbstractQueuedSynchronizer.ConditionObject`

### Field Summary

Fields
`protected static IgniteLogger` `log` Logger.

### Constructor Summary

Constructors
Constructor and Description

`GridNearAtomicUpdateFuture(GridCacheContext cctx, GridDhtAtomicCache cache, CacheWriteSynchronizationMode syncMode, GridCacheOperation op, Collection<?> keys, Collection<?> vals, Object[] invokeArgs, Collection<GridCacheDrInfo> conflictPutVals, Collection<GridCacheVersion> conflictRmvVals, boolean retval, boolean rawRetval, javax.cache.expiry.ExpiryPolicy expiryPlc, CacheEntryPredicate[] filter, UUID subjId, int taskNameHash)`

### Method Summary

Methods
`void` `checkTimeout(long timeout)` Checks if timeout occurred.
`IgniteUuid` `futureId()`
`Collection<?>` `keys()`
`void` `map()` Performs future mapping.
`void` `markNotTrackable()` Marks this future as non-trackable.
`Collection<? extends ClusterNode>` `nodes()`
`boolean` `onDone(Object res, Throwable err)` Callback to notify that future is finished.
`boolean` `onNodeLeft(UUID nodeId)` Callback for when node left.
`void` `onResult(UUID nodeId, GridNearAtomicUpdateResponse res)` Response callback.
`long` `topologyVersion()`
`String` `toString()`
`boolean` `trackable()`
`GridCacheVersion` `version()`
`boolean` `waitForPartitionExchange()`

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

`cancel, chain, duration, endTime, error, get, get, get, get0, isCancelled, isDone, isFailed, listen, onCancelled, onDone, onDone, onDone, result, startTime, 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`

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

`cancel, chain, duration, error, get, get, get, isCancelled, isDone, listen, result, startTime`

### Field Detail

#### log

    protected static IgniteLogger log

Logger.

### Constructor Detail

#### GridNearAtomicUpdateFuture

    public GridNearAtomicUpdateFuture(GridCacheContext cctx,
                              GridDhtAtomicCache cache,
                              CacheWriteSynchronizationMode syncMode,
                              GridCacheOperation op,
                              Collection<?> keys,
                              @Nullable
                              Collection<?> vals,
                              @Nullable
                              Object[] invokeArgs,
                              @Nullable
                              Collection<GridCacheDrInfo> conflictPutVals,
                              @Nullable
                              Collection<GridCacheVersion> conflictRmvVals,
                              boolean retval,
                              boolean rawRetval,
                              @Nullable
                              javax.cache.expiry.ExpiryPolicy expiryPlc,
                              CacheEntryPredicate[] filter,
                              UUID subjId,
                              int taskNameHash)

Parameters:
  `cctx` - Cache context.
  `cache` - Cache instance.
  `syncMode` - Write synchronization mode.
  `op` - Update operation.
  `keys` - Keys to update.
  `vals` - Values or transform closure.
  `invokeArgs` - Optional arguments for entry processor.
  `conflictPutVals` - Conflict put values (optional).
  `conflictRmvVals` - Conflict remove values (optional).
  `retval` - Return value require flag.
  `rawRetval` - `True` if should return `GridCacheReturn` as future result.
  `expiryPlc` - Expiry policy explicitly specified for cache operation.
  `filter` - Entry filter.
  `subjId` - Subject ID.
  `taskNameHash` - Task name hash code.

### Method Detail

#### futureId

    public IgniteUuid futureId()

Specified by:
  `futureId` in interface `GridCacheFuture<Object>`
Returns:
  Unique identifier for this future.

#### version

    public GridCacheVersion version()

Specified by:
  `version` in interface `GridCacheFuture<Object>`
Returns:
  Future version.

#### nodes

    public Collection<? extends ClusterNode> nodes()

Specified by:
  `nodes` in interface `GridCacheFuture<Object>`
Returns:
  Involved nodes.

#### waitForPartitionExchange

    public boolean waitForPartitionExchange()

Specified by:
  `waitForPartitionExchange` in interface `GridCacheAtomicFuture<Object>`
Returns:
  `True` if partition exchange should wait for this future to complete.

#### topologyVersion

    public long topologyVersion()

Specified by:
  `topologyVersion` in interface `GridCacheAtomicFuture<Object>`
Returns:
  Future topology version.

#### keys

    public Collection<?> keys()

Specified by:
  `keys` in interface `GridCacheAtomicFuture<Object>`
Returns:
  Future keys.

#### onNodeLeft

    public boolean onNodeLeft(UUID nodeId)

Callback for when node left.

Specified by:
  `onNodeLeft` in interface `GridCacheFuture<Object>`
Parameters:
  `nodeId` - Left node ID.
Returns:
  `True` if future cared about this node.

#### checkTimeout

    public void checkTimeout(long timeout)

Checks if timeout occurred.

Specified by:
  `checkTimeout` in interface `GridCacheAtomicFuture<Object>`
Parameters:
  `timeout` - Timeout to check.

#### trackable

    public boolean trackable()

Specified by:
  `trackable` in interface `GridCacheFuture<Object>`
Returns:
  `True` if future should be tracked.

#### markNotTrackable

    public void markNotTrackable()

Marks this future as non-trackable.

Specified by:
  `markNotTrackable` in interface `GridCacheFuture<Object>`

#### map

    public void map()

Performs future mapping.

#### onDone

    public boolean onDone(@Nullable
                 Object res,
                 @Nullable
                 Throwable err)

Callback to notify that future is finished. Note that if non-`null` exception is passed in the result value will be ignored.

Overrides:
  `onDone` in class `GridFutureAdapter<Object>`
Parameters:
  `res` - Optional result.
  `err` - Optional error.
Returns:
  `True` if result was set by this call.

#### onResult

    public void onResult(UUID nodeId,
                GridNearAtomicUpdateResponse res)

Response callback.

Parameters:
  `nodeId` - Node ID.
  `res` - Update response.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridFutureAdapter<Object>`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015