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

## Class GridPartitionedGetFuture<K,V>

- java.lang.Object
- - java.util.concurrent.locks.AbstractOwnableSynchronizer
  - - java.util.concurrent.locks.AbstractQueuedSynchronizer
    - - org.apache.ignite.internal.util.future.GridFutureAdapter<R>
      - - org.apache.ignite.internal.util.future.GridCompoundFuture<T,T>
        - - org.apache.ignite.internal.util.future.GridCompoundIdentityFuture<Map<K,V>>
          - - org.apache.ignite.internal.processors.cache.distributed.dht.CacheDistributedGetFutureAdapter<K,V>
            - - org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture<K,V>

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<Map<K,V>>, CacheGetFuture, GridCacheFuture<Map<K,V>>, IgniteInClosure<IgniteInternalFuture<Map<K,V>>>

    public class GridPartitionedGetFuture<K,V>
    extends CacheDistributedGetFutureAdapter<K,V>

Colocated get future.

See Also:
  Serialized Form

### Nested Class Summary

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

`AbstractQueuedSynchronizer.ConditionObject`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.dht.CacheDistributedGetFutureAdapter

`canRemap, cctx, deserializeBinary, DFLT_MAX_REMAP_CNT, expiryPlc, forcePrimary, futId, keepCacheObjects, keys, MAX_REMAP_CNT, needVer, readThrough, REMAP_CNT_UPD, remapCnt, skipVals, subjId, taskName, trackable`

### Fields inherited from class org.apache.ignite.internal.util.future.GridCompoundFuture

`sync`

### Constructor Summary

Constructors
Constructor and Description
`GridPartitionedGetFuture(GridCacheContext<K,V> cctx, Collection<KeyCacheObject> keys, AffinityTopologyVersion topVer, boolean readThrough, boolean forcePrimary, UUID subjId, String taskName, boolean deserializeBinary, IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean canRemap, boolean needVer, boolean keepCacheObjects)`

### Method Summary

Methods
`IgniteUuid` `futureId()`
`void` `init()` Initializes future.
`void` `markNotTrackable()` Marks this future as non-trackable.
`boolean` `onDone(Map<K,V> res, Throwable err)` Callback to notify that future is finished.
`boolean` `onNodeLeft(UUID nodeId)` Callback for when node left.
`void` `onResult(UUID nodeId, GridNearGetResponse res)`
`String` `toString()`
`boolean` `trackable()`

### Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.dht.CacheDistributedGetFutureAdapter

`affinityNode, partitionOwned, serverNotFoundError`

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

`add, apply, cancel, clear, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, markInitialized`

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

`chain, chain, duration, endTime, error, get, get, get, get0, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, 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, chain, duration, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result, startTime`

### Constructor Detail

#### GridPartitionedGetFuture

    public GridPartitionedGetFuture(GridCacheContext<K,V> cctx,
                            Collection<KeyCacheObject> keys,
                            AffinityTopologyVersion topVer,
                            boolean readThrough,
                            boolean forcePrimary,
                            @Nullable
                            UUID subjId,
                            String taskName,
                            boolean deserializeBinary,
                            @Nullable
                            IgniteCacheExpiryPolicy expiryPlc,
                            boolean skipVals,
                            boolean canRemap,
                            boolean needVer,
                            boolean keepCacheObjects)

Parameters:
  `cctx` - Context.
  `keys` - Keys.
  `topVer` - Topology version.
  `readThrough` - Read through flag.
  `forcePrimary` - If `true` then will force network trip to primary node even if called on backup node.
  `subjId` - Subject ID.
  `taskName` - Task name.
  `deserializeBinary` - Deserialize binary flag.
  `expiryPlc` - Expiry policy.
  `skipVals` - Skip values flag.
  `canRemap` - Flag indicating whether future can be remapped on a newer topology version.
  `needVer` - If `true` returns values as tuples containing value and version.
  `keepCacheObjects` - Keep cache objects flag.

### Method Detail

#### init

    public void init()

Initializes future.

#### trackable

    public boolean trackable()

Returns:
  `True` if future should be tracked.

#### markNotTrackable

    public void markNotTrackable()

Marks this future as non-trackable.

#### futureId

    public IgniteUuid futureId()

Returns:
  Unique identifier for this future.

#### onNodeLeft

    public boolean onNodeLeft(UUID nodeId)

Callback for when node left.

Parameters:
  `nodeId` - Left node ID.
Returns:
  `True` if future cared about this node.

#### onResult

    public void onResult(UUID nodeId,
                GridNearGetResponse res)

Parameters:
  `nodeId` - Sender.
  `res` - Result.

#### onDone

    public boolean onDone(Map<K,V> res,
                 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<Map<K,V>>`
Parameters:
  `res` - Optional result.
  `err` - Optional error.
Returns:
  `True` if result was set by this call.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCompoundIdentityFuture<Map<K,V>>`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017