@GridToStringExclude public interface GridDhtPartitionTopology
void readLock()
void readUnlock()
readLock() method.void updateTopologyVersion(GridDhtPartitionExchangeId exchId, GridDhtPartitionsExchangeFuture exchFut, long updateSeq, boolean stopping) throws IgniteInterruptedCheckedException
exchId - Exchange ID.exchFut - Exchange future.updateSeq - Update sequence.stopping - Stopping flag.IgniteInterruptedCheckedException - If interrupted.AffinityTopologyVersion topologyVersion()
GridDhtTopologyFuture topologyVersionFuture()
boolean stopping()
True if cache is being stopped.int cacheId()
void beforeExchange(GridDhtPartitionsExchangeFuture exchFut, boolean affReady) throws IgniteCheckedException
exchFut - Exchange future.affReady - Affinity ready flag.IgniteCheckedException - If failed.void initPartitions(GridDhtPartitionsExchangeFuture exchFut) throws IgniteInterruptedCheckedException
exchFut - Exchange future.IgniteInterruptedCheckedException - If interrupted.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.void releasePartitions(int... parts)
parts - Partitions to release (should be reserved before).@Nullable GridDhtLocalPartition localPartition(Object key, boolean create) throws GridDhtInvalidPartitionException
key - Cache key.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.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<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.GridDhtPartitionMap update(@Nullable GridDhtPartitionExchangeId exchId, GridDhtPartitionFullMap partMap, @Nullable Map<Integer,T2<Long,Long>> cntrMap)
exchId - Exchange ID.partMap - Update partition map.cntrMap - Partition update counters.null otherwise.@Nullable GridDhtPartitionMap update(@Nullable GridDhtPartitionExchangeId exchId, GridDhtPartitionMap parts, @Nullable Map<Integer,T2<Long,Long>> cntrMap)
exchId - Exchange ID.parts - Partitions.cntrMap - Partition update counters.null otherwise.boolean detectLostPartitions(DiscoveryEvent discoEvt)
This method should be called on topology coordinator after all partition messages are received.
discoEvt - Discovery event for which we detect lost partitions.True if partitons state got updated.void resetLostPartitions()
Collection<Integer> lostPartitions()
void checkEvictions()
Map<Integer,T2<Long,Long>> updateCounters(boolean skipZeros)
skipZeros - If true then filters out zero counters.boolean own(GridDhtLocalPartition part)
part - Partition to own.True if owned.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.boolean rebalanceFinished(AffinityTopologyVersion topVer)
topVer - Topology version.True if rebalance process finished.void setOwners(int p,
Set<UUID> owners,
boolean updateSeq)
p - Partition ID.updateSeq - If should increment sequence when updated.owners - Set of new owners.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017