@GridToStringExclude public class GridClientPartitionTopology extends Object implements GridDhtPartitionTopology
| Constructor and Description |
|---|
GridClientPartitionTopology(GridCacheSharedContext cctx,
int cacheId,
GridDhtPartitionsExchangeFuture exchFut) |
public GridClientPartitionTopology(GridCacheSharedContext cctx, int cacheId, GridDhtPartitionsExchangeFuture exchFut)
cctx - Context.cacheId - Cache ID.exchFut - Exchange ID.public int cacheId()
public void readLock()
readLock in interface GridDhtPartitionTopologypublic void readUnlock()
GridDhtPartitionTopology.readLock() method.readUnlock in interface GridDhtPartitionTopologypublic void updateTopologyVersion(GridDhtPartitionExchangeId exchId, GridDhtPartitionsExchangeFuture exchFut, long updSeq, boolean stopping) throws IgniteInterruptedCheckedException
updateTopologyVersion in interface GridDhtPartitionTopologyexchId - Exchange ID.exchFut - Exchange future.updSeq - Update sequence.stopping - Stopping flag.IgniteInterruptedCheckedException - If interrupted.public AffinityTopologyVersion topologyVersion()
topologyVersion in interface GridDhtPartitionTopologypublic GridDhtTopologyFuture topologyVersionFuture()
topologyVersionFuture in interface GridDhtPartitionTopologypublic boolean stopping()
stopping in interface GridDhtPartitionTopologyTrue if cache is being stopped.public void initPartitions(GridDhtPartitionsExchangeFuture exchFut)
initPartitions in interface GridDhtPartitionTopologyexchFut - Exchange future.public void beforeExchange(GridDhtPartitionsExchangeFuture exchFut, boolean initParts) throws IgniteCheckedException
beforeExchange in interface GridDhtPartitionTopologyexchFut - Exchange future.initParts - Affinity ready flag.IgniteCheckedException - If failed.public boolean afterExchange(GridDhtPartitionsExchangeFuture exchFut) throws IgniteCheckedException
afterExchange in interface GridDhtPartitionTopologyexchFut - Exchange future.True if mapping was changed.IgniteCheckedException - If failed.@Nullable public GridDhtLocalPartition localPartition(int p, AffinityTopologyVersion topVer, boolean create) throws GridDhtInvalidPartitionException
localPartition in interface GridDhtPartitionTopologyp - Partition ID.topVer - Topology version at the time of creation.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.public GridDhtLocalPartition localPartition(Object key, boolean create)
localPartition in interface GridDhtPartitionTopologykey - Cache key.create - If true, then partition will be created if it's not there.public void releasePartitions(int... parts)
releasePartitions in interface GridDhtPartitionTopologyparts - Partitions to release (should be reserved before).public List<GridDhtLocalPartition> localPartitions()
localPartitions in interface GridDhtPartitionTopologypublic Collection<GridDhtLocalPartition> currentLocalPartitions()
currentLocalPartitions in interface GridDhtPartitionTopologypublic void onRemoved(GridDhtCacheEntry e)
onRemoved in interface GridDhtPartitionTopologye - Entry removed from cache.public GridDhtPartitionMap2 localPartitionMap()
localPartitionMap in interface GridDhtPartitionTopologypublic GridDhtPartitionState partitionState(UUID nodeId, int part)
partitionState in interface GridDhtPartitionTopologynodeId - Node ID.part - Partition.public List<ClusterNode> nodes(int p, AffinityTopologyVersion topVer)
nodes in interface GridDhtPartitionTopologyp - Partition ID.topVer - Topology version.public List<ClusterNode> owners(int p, AffinityTopologyVersion topVer)
owners in interface GridDhtPartitionTopologyp - Partition ID.topVer - Topology version.own this partition.public List<ClusterNode> owners(int p)
owners in interface GridDhtPartitionTopologyp - Partition ID.own this partition.public List<ClusterNode> moving(int p)
moving in interface GridDhtPartitionTopologyp - Partition ID.are preloading this partition.public long updateSequence()
updateSequence in interface GridDhtPartitionTopologypublic long lastUpdateSequence()
public GridDhtPartitionFullMap partitionMap(boolean onlyActive)
partitionMap in interface GridDhtPartitionTopologyonlyActive - If true, then only active partitions will be returned.@Nullable public GridDhtPartitionMap2 update(@Nullable GridDhtPartitionExchangeId exchId, GridDhtPartitionFullMap partMap, Map<Integer,Long> cntrMap)
update in interface GridDhtPartitionTopologyexchId - Exchange ID.partMap - Update partition map.cntrMap - Partition update counters.null otherwise.@Nullable public GridDhtPartitionMap2 update(@Nullable GridDhtPartitionExchangeId exchId, GridDhtPartitionMap2 parts, Map<Integer,Long> cntrMap)
update in interface GridDhtPartitionTopologyexchId - Exchange ID.parts - Partitions.cntrMap - Partition update counters.null otherwise.public boolean own(GridDhtLocalPartition part)
own in interface GridDhtPartitionTopologypart - Partition to own.True if owned.public void onEvicted(GridDhtLocalPartition part, boolean updateSeq)
onEvicted in interface GridDhtPartitionTopologypart - Evicted partition.updateSeq - Update sequence increment flag.@Nullable public GridDhtPartitionMap2 partitions(UUID nodeId)
partitions in interface GridDhtPartitionTopologynodeId - Node to get partitions for.public Map<Integer,Long> updateCounters()
updateCounters in interface GridDhtPartitionTopologypublic boolean rebalanceFinished(AffinityTopologyVersion topVer)
rebalanceFinished in interface GridDhtPartitionTopologytopVer - Topology version.True if rebalance process finished.public void printMemoryStats(int threshold)
printMemoryStats in interface GridDhtPartitionTopologythreshold - Threshold for number of entries.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.7.0 Release Date : August 1 2016