@GridToStringExclude public interface GridDhtPartitionTopology
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterExchange(GridDhtPartitionsExchangeFuture exchFut)
Post-initializes this topology.
|
void |
applyUpdateCounters(Map<Integer,T2<Long,Long>> cntrMap) |
void |
beforeExchange(GridDhtPartitionsExchangeFuture exchFut,
boolean affReady)
Pre-initializes this topology.
|
Iterable<GridDhtLocalPartition> |
currentLocalPartitions() |
boolean |
detectLostPartitions(DiscoveryEvent discoEvt)
Checks if there is at least one owner for each partition in the cache topology.
|
int |
groupId() |
boolean |
hasMovingPartitions() |
void |
initPartitions(GridDhtPartitionsExchangeFuture exchFut) |
GridDhtLocalPartition |
localPartition(int part) |
GridDhtLocalPartition |
localPartition(int p,
AffinityTopologyVersion topVer,
boolean create) |
GridDhtLocalPartition |
localPartition(int p,
AffinityTopologyVersion topVer,
boolean create,
boolean showRenting) |
GridDhtPartitionMap |
localPartitionMap() |
List<GridDhtLocalPartition> |
localPartitions() |
Collection<Integer> |
lostPartitions() |
List<ClusterNode> |
moving(int p) |
List<ClusterNode> |
nodes(int p,
AffinityAssignment affAssignment,
List<ClusterNode> affNodes) |
List<ClusterNode> |
nodes(int p,
AffinityTopologyVersion topVer) |
void |
onEvicted(GridDhtLocalPartition part,
boolean updateSeq) |
void |
onExchangeDone(AffinityAssignment assignment)
Callback on exchange done.
|
void |
onRemoved(GridDhtCacheEntry e) |
boolean |
own(GridDhtLocalPartition part) |
List<ClusterNode> |
owners(int p) |
List<ClusterNode> |
owners(int p,
AffinityTopologyVersion topVer) |
GridDhtPartitionFullMap |
partitionMap(boolean onlyActive) |
GridDhtPartitionMap |
partitions(UUID nodeId) |
GridDhtPartitionState |
partitionState(UUID nodeId,
int part) |
void |
printMemoryStats(int threshold)
Prints memory stats.
|
void |
readLock()
Locks the topology, usually during mapping on locks or transactions.
|
void |
readUnlock()
Unlocks topology locked by
readLock() method. |
boolean |
rebalanceFinished(AffinityTopologyVersion topVer) |
void |
releasePartitions(int... parts) |
void |
resetLostPartitions()
Resets the state of all LOST partitions to OWNING.
|
Set<UUID> |
setOwners(int p,
Set<UUID> owners,
boolean haveHistory,
boolean updateSeq)
Make nodes from provided set owners for a given partition.
|
boolean |
stopping() |
AffinityTopologyVersion |
topologyVersion()
Topology version.
|
GridDhtTopologyFuture |
topologyVersionFuture()
Gets a future that will be completed when partition exchange map for this
particular topology version is done.
|
boolean |
update(AffinityTopologyVersion exchangeVer,
GridDhtPartitionFullMap partMap,
Map<Integer,T2<Long,Long>> cntrMap,
Set<Integer> partsToReload) |
boolean |
update(GridDhtPartitionExchangeId exchId,
GridDhtPartitionMap parts) |
Map<Integer,T2<Long,Long>> |
updateCounters(boolean skipZeros) |
long |
updateSequence() |
void |
updateTopologyVersion(GridDhtTopologyFuture exchFut,
DiscoCache discoCache,
long updateSeq,
boolean stopping)
Updates topology version.
|
void readLock()
void readUnlock()
readLock() method.void updateTopologyVersion(GridDhtTopologyFuture exchFut, DiscoCache discoCache, long updateSeq, boolean stopping) throws IgniteInterruptedCheckedException
exchFut - Exchange future.discoCache - Discovery data cache.updateSeq - Update sequence.stopping - Stopping flag.IgniteInterruptedCheckedException - If interrupted.AffinityTopologyVersion topologyVersion()
GridDhtTopologyFuture topologyVersionFuture()
boolean stopping()
True if cache is being stopped.int groupId()
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.@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<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 exchangeVer,
GridDhtPartitionFullMap partMap,
@Nullable
Map<Integer,T2<Long,Long>> cntrMap,
Set<Integer> partsToReload)
exchangeVer - Exchange version.partMap - Update partition map.cntrMap - Partition update counters.True if local state was changed.boolean update(@Nullable
GridDhtPartitionExchangeId exchId,
GridDhtPartitionMap parts)
exchId - Exchange ID.parts - Partitions.True if local state was changed.void applyUpdateCounters(Map<Integer,T2<Long,Long>> cntrMap)
cntrMap - Counters map.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 partitions state got updated.void resetLostPartitions()
Collection<Integer> lostPartitions()
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.Set<UUID> setOwners(int p, Set<UUID> owners, boolean haveHistory, boolean updateSeq)
p - Partition ID.updateSeq - If should increment sequence when updated.owners - Set of new owners.void onExchangeDone(AffinityAssignment assignment)
assignment - New affinity assignment.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.2.0 Release Date : September 15 2017