Class GridDhtForceKeysFuture<K,V>
- java.lang.Object
-
- org.apache.ignite.internal.util.future.GridFutureAdapter<R>
-
- org.apache.ignite.internal.util.future.GridCompoundFuture<Object,Collection<K>>
-
- org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysFuture<K,V>
-
- All Implemented Interfaces:
Serializable,IgniteInternalFuture<Collection<K>>,GridDhtFuture<Collection<K>>,IgniteInClosure<IgniteInternalFuture<Object>>
public final class GridDhtForceKeysFuture<K,V> extends GridCompoundFuture<Object,Collection<K>> implements GridDhtFuture<Collection<K>>
Force keys request future.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridDhtForceKeysFuture(GridCacheContext<K,V> cctx, AffinityTopologyVersion topVer, Collection<KeyCacheObject> keys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IgniteUuidfutureId()voidinit()Initializes this future.Collection<Integer>invalidPartitions()Node that future should be able to provide keys to retry before it completes, so it's not necessary to wait till future is done to get retry keys.voidonDiscoveryEvent(DiscoveryEvent evt)booleanonDone(@Nullable Collection<K> res, @Nullable Throwable err)Callback to notify that future is finished.voidonResult(GridDhtForceKeysResponse res)StringtoString()-
Methods inherited from class org.apache.ignite.internal.util.future.GridCompoundFuture
add, apply, cancel, clear, compoundsLockedExclusively, compoundsReadLock, compoundsReadUnlock, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, logDebug, logError, markInitialized, processFailure
-
Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter
chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, listen, logger, onCancelled, onDone, onDone, onDone, onDone, reset, result
-
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, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, listen, result
-
-
-
-
Constructor Detail
-
GridDhtForceKeysFuture
public GridDhtForceKeysFuture(GridCacheContext<K,V> cctx, AffinityTopologyVersion topVer, Collection<KeyCacheObject> keys)
- Parameters:
cctx- Cache context.topVer- Topology version.keys- Keys.
-
-
Method Detail
-
futureId
public IgniteUuid futureId()
- Returns:
- Future ID.
-
invalidPartitions
public Collection<Integer> invalidPartitions()
Node that future should be able to provide keys to retry before it completes, so it's not necessary to wait till future is done to get retry keys.- Specified by:
invalidPartitionsin interfaceGridDhtFuture<K>- Returns:
- Keys to retry because this node is no longer a primary or backup.
-
onDone
public boolean onDone(@Nullable @Nullable Collection<K> res, @Nullable @Nullable Throwable err)Callback to notify that future is finished. Note that if non-nullexception is passed in the result value will be ignored.- Overrides:
onDonein classGridFutureAdapter<Collection<K>>- Parameters:
res- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
onDiscoveryEvent
public void onDiscoveryEvent(DiscoveryEvent evt)
- Parameters:
evt- Discovery event.
-
onResult
public void onResult(GridDhtForceKeysResponse res)
- Parameters:
res- Response.
-
init
public void init()
Initializes this future.
-
toString
public String toString()
- Overrides:
toStringin classGridCompoundFuture<Object,Collection<K>>
-
-