Class TopologyInfo
- java.lang.Object
-
- org.infinispan.distribution.topologyaware.TopologyInfo
-
public class TopologyInfo extends Object
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
Nested Classes Modifier and Type Class Description static class
TopologyInfo.Cluster
static class
TopologyInfo.Location
Base class for locations.static class
TopologyInfo.Machine
static class
TopologyInfo.Node
static class
TopologyInfo.Rack
static class
TopologyInfo.Site
-
Constructor Summary
Constructors Constructor Description TopologyInfo(int numSegments, int numOwners, Collection<Address> members, Map<Address,Float> capacityFactors)
-
Method Summary
-
-
-
Constructor Detail
-
TopologyInfo
public TopologyInfo(int numSegments, int numOwners, Collection<Address> members, Map<Address,Float> capacityFactors)
-
-
Method Detail
-
getDistinctLocationsCount
public int getDistinctLocationsCount(TopologyLevel level)
-
getDistinctLocationsCount
public int getDistinctLocationsCount(TopologyLevel level, Collection<Address> addresses)
-
duplicateLocation
public boolean duplicateLocation(TopologyLevel level, Collection<Address> addresses, Address candidate, boolean excludeCandidate)
-
getLocationId
public Object getLocationId(TopologyLevel level, Address address)
-
getSiteNodes
public Collection<Address> getSiteNodes(String site)
-
getRackNodes
public Collection<Address> getRackNodes(String site, String rack)
-
getMachineNodes
public Collection<Address> getMachineNodes(String site, String rack, String machine)
-
getAllSites
public Collection<String> getAllSites()
-
getSiteRacks
public Collection<String> getSiteRacks(String site)
-
getRackMachines
public Collection<String> getRackMachines(String site, String rack)
-
formatLocation
public String formatLocation(DecimalFormat df, TopologyInfo.Location location, String prefix)
-
computeTotalCapacity
public float computeTotalCapacity(Collection<Address> nodes, Map<Address,Float> capacityFactors)
-
getExpectedPrimarySegments
public float getExpectedPrimarySegments(Address address)
-
getExpectedOwnedSegments
public float getExpectedOwnedSegments(Address address)
-
getSiteIndex
public int getSiteIndex(Address address)
-
getRackIndex
public int getRackIndex(Address address)
-
getMachineIndex
public int getMachineIndex(Address address)
-
-