Class TopologyInfo
java.lang.Object
org.infinispan.distribution.topologyaware.TopologyInfo
This class holds the topology hierarchy of a cache's members and estimates for owned segments.
- Since:
- 5.2
- Author:
- Dan Berindei
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Base class for locations.static class
static class
static class
static class
-
Constructor Summary
ConstructorDescriptionTopologyInfo
(int numSegments, int numOwners, Collection<Address> members, Map<Address, Float> capacityFactors) -
Method Summary
Modifier and TypeMethodDescriptionfloat
computeTotalCapacity
(Collection<Address> nodes, Map<Address, Float> capacityFactors) boolean
duplicateLocation
(TopologyLevel level, Collection<Address> addresses, Address candidate, boolean excludeCandidate) formatLocation
(DecimalFormat df, TopologyInfo.Location location, String prefix) int
int
getDistinctLocationsCount
(TopologyLevel level, Collection<Address> addresses) float
getExpectedOwnedSegments
(Address address) float
getExpectedPrimarySegments
(Address address) getLocationId
(TopologyLevel level, Address address) int
getMachineIndex
(Address address) getMachineNodes
(String site, String rack, String machine) int
getRackIndex
(Address address) getRackMachines
(String site, String rack) getRackNodes
(String site, String rack) int
getSiteIndex
(Address address) getSiteNodes
(String site) getSiteRacks
(String site) toString()
-
Constructor Details
-
TopologyInfo
public TopologyInfo(int numSegments, int numOwners, Collection<Address> members, Map<Address, Float> capacityFactors)
-
-
Method Details
-
getDistinctLocationsCount
-
getDistinctLocationsCount
-
duplicateLocation
public boolean duplicateLocation(TopologyLevel level, Collection<Address> addresses, Address candidate, boolean excludeCandidate) -
getLocationId
-
getSiteNodes
-
getRackNodes
-
getMachineNodes
-
getAllSites
-
getSiteRacks
-
getRackMachines
-
toString
-
formatLocation
-
computeTotalCapacity
-
getExpectedPrimarySegments
-
getExpectedOwnedSegments
-
getSiteIndex
-
getRackIndex
-
getMachineIndex
-