public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapter implements Comparable<GridDhtPartitionsExchangeFuture>, CachePartitionExchangeWorkerTask, IgniteDiagnosticAware
GridDhtTopologyFutureAdapter.CacheValidation| Modifier and Type | Field and Description |
|---|---|
static String |
EXCHANGE_LOG |
grpValidRes| Constructor and Description |
|---|
GridDhtPartitionsExchangeFuture(GridCacheSharedContext cctx,
ReadWriteLock busyLock,
GridDhtPartitionExchangeId exchId,
ExchangeActions exchActions,
CacheAffinityChangeMessage affChangeMsg) |
validateCache, validateCacheGroupcancel, chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, onDone, reset, resultclone, finalize, getClass, notify, notifyAll, wait, wait, waitcancel, chain, chain, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, resultpublic static final String EXCHANGE_LOG
public GridDhtPartitionsExchangeFuture(GridCacheSharedContext cctx, ReadWriteLock busyLock, GridDhtPartitionExchangeId exchId, ExchangeActions exchActions, CacheAffinityChangeMessage affChangeMsg)
cctx - Cache context.busyLock - Busy lock.exchId - Exchange ID.exchActions - Cache change requests.affChangeMsg - Affinity change message.public Object mutex()
public GridCacheSharedContext sharedContext()
public boolean skipForExchangeMerge()
skipForExchangeMerge in interface CachePartitionExchangeWorkerTaskFalse if exchange merge should stop if this task is found in exchange worker queue.public ExchangeContext context()
public void exchangeActions(ExchangeActions exchActions)
evtLatch be armed.exchActions - Exchange actions.@Nullable public ExchangeActions exchangeActions()
null (for example, if the exchange is created for topology
change event).public void affinityChangeMessage(CacheAffinityChangeMessage affChangeMsg)
affChangeMsg - Affinity change message.public AffinityTopologyVersion initialVersion()
initialVersion in interface GridDhtTopologyFuturepublic AffinityTopologyVersion topologyVersion()
This method should be called only for finished topology future since result version is not known before exchange finished.
topologyVersion in interface GridDhtTopologyFuture@Nullable public UUID partitionHistorySupplier(int grpId, int partId)
grpId - Cache group ID.partId - Partition ID.public boolean cacheAddedOnExchange(int cacheId,
UUID rcvdFrom)
cacheId - Cache ID.rcvdFrom - Node ID cache was received from.True if cache was added during this exchange.public boolean cacheGroupAddedOnExchange(int grpId,
UUID rcvdFrom)
grpId - Cache group ID.rcvdFrom - Node ID cache group was received from.True if cache group was added during this exchange.public boolean dynamicCacheGroupStarted(int grpId)
grpId - Cache group ID.True if non-client cache group was added during this exchange.public boolean onAdded()
Truepublic void onEvent(GridDhtPartitionExchangeId exchId, DiscoveryEvent discoEvt, DiscoCache discoCache)
exchId - Exchange ID.discoEvt - Discovery event.discoCache - Discovery data cache.public boolean activateCluster()
True if activate cluster exchange.public boolean changedBaseline()
public DiscoveryEvent firstEvent()
public DiscoCache firstEventCache()
public ExchangeDiscoveryEvents events()
public GridDhtPartitionExchangeId exchangeId()
public void init(boolean newCrd)
throws IgniteInterruptedCheckedException
newCrd - True if node become coordinator on this exchange.IgniteInterruptedCheckedException - If interrupted.public boolean localJoinExchange()
True if exchange for local node join.public boolean serverNodeDiscoveryEvent()
True if exchange triggered by server node join or fail.public boolean exchangeDone()
GridCachePartitionExchangeManager.affinityReadyFuture(AffinityTopologyVersion)
is completed before GridFutureAdapter.onDone(Object, Throwable) is called on
GridDhtPartitionsExchangeFuture, it is guaranteed that this method will return true
if affinity ready future is finished.
Also this method returns false for merged exchange futures.
exchangeDone in interface GridDhtTopologyFutureTrue if exchange is finished and result topology version can be used.public void finishMerged()
public boolean onDone(@Nullable
AffinityTopologyVersion res,
@Nullable
Throwable err)
null exception is passed in
the result value will be ignored.onDone in class GridFutureAdapter<AffinityTopologyVersion>res - Optional result.err - Optional error.True if result was set by this call.public void cleanUp()
public boolean mergeJoinExchange(GridDhtPartitionsExchangeFuture fut)
fut - Current exchange to merge with.True if need wait for message from joined server node.@Nullable public GridDhtPartitionsSingleMessage mergeJoinExchangeOnDone(GridDhtPartitionsExchangeFuture fut)
fut - Current future.public void onReceiveSingleMessage(ClusterNode node, GridDhtPartitionsSingleMessage msg)
initDone()node - Sender node.msg - Single partition info.public void waitAndReplyToNode(UUID nodeId, GridDhtPartitionsSingleMessage msg)
nodeId - Node ID.msg - Client's message.public void onReceiveFullMessage(ClusterNode node, GridDhtPartitionsFullMessage msg)
node - Sender node.msg - Full partition info.public void onReceivePartitionRequest(ClusterNode node, GridDhtPartitionsSingleRequest msg)
node - Sender node.msg - Message with full partition info.public void onAffinityChangeMessage(ClusterNode node, CacheAffinityChangeMessage msg)
onNodeLeft(org.apache.ignite.cluster.ClusterNode).node - Message sender node.msg - Message.public void onNodeLeft(ClusterNode node)
onAffinityChangeMessage(org.apache.ignite.cluster.ClusterNode, org.apache.ignite.internal.processors.cache.CacheAffinityChangeMessage).node - Left node.public boolean reconnectOnError(Throwable e)
e - Exception.True if local node should try reconnect in case of error.public int compareTo(GridDhtPartitionsExchangeFuture fut)
compareTo in interface Comparable<GridDhtPartitionsExchangeFuture>public void addDiagnosticRequest(IgniteDiagnosticPrepareContext diagCtx)
addDiagnosticRequest in interface IgniteDiagnosticAwarediagCtx - Context.public String shortInfo()
public String toString()
toString in class GridFutureAdapter<AffinityTopologyVersion>public static long nextDumpTimeout(int step,
long timeout)
step - Exponent coefficient.timeout - Base timeout.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018