@GridToStringExclude public interface GridDhtPartitionTopology
int partitions()
void readLock()
void readUnlock()
readLock() method.boolean holdsLock()
True if locked by current thread.void updateTopologyVersion(GridDhtTopologyFuture exchFut, DiscoCache discoCache, MvccCoordinator mvccCrd, long updateSeq, boolean stopping) throws IgniteInterruptedCheckedException
exchFut - Exchange future.discoCache - Discovery data cache.updateSeq - Update sequence.stopping - Stopping flag.IgniteInterruptedCheckedException - If interrupted.AffinityTopologyVersion readyTopologyVersion()
AffinityTopologyVersion lastTopologyChangeVersion()
GridDhtTopologyFuture topologyVersionFuture()
boolean stopping()
True if cache is being stopped.int groupId()
void beforeExchange(GridDhtPartitionsExchangeFuture exchFut, boolean affReady, boolean updateMoving) throws IgniteCheckedException
exchFut - Exchange future.affReady - Affinity ready flag.updateMoving - IgniteCheckedException - If failed.boolean initPartitionsWhenAffinityReady(AffinityTopologyVersion affVer, GridDhtPartitionsExchangeFuture exchFut) throws IgniteInterruptedCheckedException
affVer - Affinity version.exchFut - Exchange future.True if partitions must be refreshed.IgniteInterruptedCheckedException - If interrupted.void afterStateRestored(AffinityTopologyVersion topVer)
topVer - Topology version.boolean afterExchange(GridDhtPartitionsExchangeFuture exchFut) throws IgniteCheckedException
exchFut - Exchange future.True if mapping was changed.IgniteCheckedException - If failed.@Nullable GridDhtLocalPartition localPartition(int p, AffinityTopologyVersion topVer, boolean create) throws GridDhtInvalidPartitionException
topVer - Topology version at the time of creation.p - Partition ID.create - If true, then partition will be created if it's not there.GridDhtInvalidPartitionException - If partition is evicted or absent and
does not belong to this node.GridDhtLocalPartition forceCreatePartition(int p) throws IgniteCheckedException
p - Partition ID.IgniteCheckedException - If failed.@Nullable GridDhtLocalPartition localPartition(int p, AffinityTopologyVersion topVer, boolean create, boolean showRenting) throws GridDhtInvalidPartitionException
topVer - Topology version at the time of creation.p - Partition ID.create - If true, then partition will be created if it's not there.GridDhtInvalidPartitionException - If partition is evicted or absent and
does not belong to this node.void releasePartitions(int... parts)
parts - Partitions to release (should be reserved before).@Nullable GridDhtLocalPartition localPartition(int part) throws GridDhtInvalidPartitionException
part - Partition number.GridDhtInvalidPartitionException - If partition is evicted or absent and
does not belong to this node.List<GridDhtLocalPartition> localPartitions()
Iterable<GridDhtLocalPartition> currentLocalPartitions()
GridDhtPartitionMap localPartitionMap()
GridDhtPartitionState partitionState(UUID nodeId, int part)
nodeId - Node ID.part - Partition.long updateSequence()
List<ClusterNode> nodes(int p, AffinityTopologyVersion topVer)
p - Partition ID.topVer - Topology version.@Nullable List<ClusterNode> nodes(int p, AffinityAssignment affAssignment, List<ClusterNode> affNodes)
p - Partition ID.affAssignment - Assignments.affNodes - Node assigned for given partition by affinity.List<ClusterNode> owners(int p)
p - Partition ID.own this partition.List<List<ClusterNode>> allOwners()
List<ClusterNode> owners(int p, AffinityTopologyVersion topVer)
p - Partition ID.topVer - Topology version.own this partition.List<ClusterNode> moving(int p)
p - Partition ID.are preloading this partition.GridDhtPartitionFullMap partitionMap(boolean onlyActive)
onlyActive - If true, then only active partitions will be returned.boolean hasMovingPartitions()
True If one of cache nodes has partitions in GridDhtPartitionState.MOVING state.void onRemoved(GridDhtCacheEntry e)
e - Entry removed from cache.boolean update(@Nullable
AffinityTopologyVersion exchangeResVer,
GridDhtPartitionFullMap partMap,
@Nullable
CachePartitionFullCountersMap cntrMap,
Set<Integer> partsToReload,
@Nullable
Map<Integer,Long> partSizes,
@Nullable
AffinityTopologyVersion msgTopVer)
exchangeResVer - Result topology version for exchange. Value should be greater than previously passed. Null value
means full map received is not related to exchangepartMap - Update partition map.cntrMap - Partition update counters.partsToReload - Set of partitions that need to be reloaded.msgTopVer - Topology version from incoming message. This value is not null only for case message is not
related to exchange. Value should be not less than previous 'Topology version from exchange'.True if local state was changed.boolean update(@Nullable
GridDhtPartitionExchangeId exchId,
GridDhtPartitionMap parts,
boolean force)
exchId - Exchange ID.parts - Partitions.force - True to skip stale update check.True if local state was changed.void collectUpdateCounters(CachePartitionPartialCountersMap cntrMap)
cntrMap - Counters map.void applyUpdateCounters()
boolean detectLostPartitions(AffinityTopologyVersion resTopVer, DiscoveryEvent discoEvt)
This method should be called on topology coordinator after all partition messages are received.
resTopVer - Exchange result version.discoEvt - Discovery event for which we detect lost partitions.True if partitions state got updated.void resetLostPartitions(AffinityTopologyVersion resTopVer)
resTopVer - Exchange result version.Collection<Integer> lostPartitions()
CachePartitionFullCountersMap fullUpdateCounters()
CachePartitionPartialCountersMap localUpdateCounters(boolean skipZeros, boolean finalizeCntrsBeforeCollecting)
skipZeros - True for adding zero counter to map.finalizeCntrsBeforeCollecting - True indicates that partition counters should be finalized.boolean own(GridDhtLocalPartition part)
part - Partition to own.True if owned.void ownMoving(AffinityTopologyVersion topVer)
topVer - Topology version.void onEvicted(GridDhtLocalPartition part, boolean updateSeq)
part - Evicted partition.updateSeq - Update sequence increment flag.@Nullable GridDhtPartitionMap partitions(UUID nodeId)
nodeId - Node to get partitions for.void printMemoryStats(int threshold)
threshold - Threshold for number of entries.Map<Integer,Long> globalPartSizes()
void globalPartSizes(@Nullable
Map<Integer,Long> partSizes)
partSizes - Sizes of up-to-date partition versions in topology.boolean rebalanceFinished(AffinityTopologyVersion topVer)
topVer - Topology version.True if rebalance process finished.Map<UUID,Set<Integer>> resetOwners(Map<Integer,Set<UUID>> ownersByUpdCounters, Set<Integer> haveHistory)
ownersByUpdCounters will be reset to MOVING.ownersByUpdCounters - Map (partition, set of node IDs that have most actual state about partition
(update counter is maximal) and should hold OWNING state for such partition).haveHistory - Set of partitions which have WAL history to rebalance.void onExchangeDone(GridDhtPartitionsExchangeFuture fut, AffinityAssignment assignment, boolean updateRebalanceVer)
assignment - New affinity assignment.updateRebalanceVer - True if need check rebalance state.MvccCoordinator mvccCoordinator()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019