Class GridDhtAssignmentFetchFuture
- java.lang.Object
-
- org.apache.ignite.internal.util.future.GridFutureAdapter<GridDhtAffinityAssignmentResponse>
-
- org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAssignmentFetchFuture
-
- All Implemented Interfaces:
IgniteInternalFuture<GridDhtAffinityAssignmentResponse>
public class GridDhtAssignmentFetchFuture extends GridFutureAdapter<GridDhtAffinityAssignmentResponse>
Future that fetches affinity assignment from remote cache nodes.
-
-
Constructor Summary
Constructors Constructor Description GridDhtAssignmentFetchFuture(GridCacheSharedContext ctx, int grpId, AffinityTopologyVersion topVer, DiscoCache discoCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgroupId()longid()voidinit(boolean needPartState)Initializes fetch future.booleanonDone(@Nullable GridDhtAffinityAssignmentResponse res, @Nullable Throwable err)Callback to notify that future is finished.voidonNodeLeft(UUID leftNodeId)voidonResponse(UUID nodeId, GridDhtAffinityAssignmentResponse res)StringtoString()-
Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter
cancel, 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
-
-
-
-
Constructor Detail
-
GridDhtAssignmentFetchFuture
public GridDhtAssignmentFetchFuture(GridCacheSharedContext ctx, int grpId, AffinityTopologyVersion topVer, DiscoCache discoCache)
- Parameters:
ctx- Context.grpId- Group ID.topVer- Topology version.discoCache- Discovery cache.
-
-
Method Detail
-
groupId
public int groupId()
- Returns:
- Cache group ID.
-
id
public long id()
- Returns:
- Future ID.
-
init
public void init(boolean needPartState)
Initializes fetch future.- Parameters:
needPartState-Trueif also need fetch partitions state.
-
onResponse
public void onResponse(UUID nodeId, GridDhtAffinityAssignmentResponse res)
- Parameters:
nodeId- Node ID.res- Response.
-
onNodeLeft
public void onNodeLeft(UUID leftNodeId)
- Parameters:
leftNodeId- Left node ID.
-
onDone
public boolean onDone(@Nullable @Nullable GridDhtAffinityAssignmentResponse 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<GridDhtAffinityAssignmentResponse>- Parameters:
res- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
toString
public String toString()
- Overrides:
toStringin classGridFutureAdapter<GridDhtAffinityAssignmentResponse>
-
-