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.- Since:
- 5.2
- Author:
- Dan Berindei
-
-
Constructor Summary
Constructors Constructor Description TopologyInfo(Collection<Address> members, Map<Address,Float> capacityFactors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeExpectedSegments(int numSegments, int numOwners, Address node)
float
computeTotalCapacity(Collection<Address> nodes, Map<Address,Float> capacityFactors)
int
getAllMachinesCount()
int
getAllNodesCount()
int
getAllRacksCount()
Set<String>
getAllSites()
int
getAllSitesCount()
int
getDistinctLocationsCount(TopologyLevel level, int numOwners)
Collection<Address>
getMachineNodes(String site, String rack, String machine)
Set<String>
getRackMachines(String site, String rack)
Collection<Address>
getRackNodes(String site, String rack)
Collection<Address>
getSiteNodes(String site)
Set<String>
getSiteRacks(String site)
String
toString()
-
-
-
Constructor Detail
-
TopologyInfo
public TopologyInfo(Collection<Address> members, Map<Address,Float> capacityFactors)
-
-
Method Detail
-
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)
-
getAllSitesCount
public int getAllSitesCount()
-
getAllRacksCount
public int getAllRacksCount()
-
getAllMachinesCount
public int getAllMachinesCount()
-
getAllNodesCount
public int getAllNodesCount()
-
getDistinctLocationsCount
public int getDistinctLocationsCount(TopologyLevel level, int numOwners)
-
computeTotalCapacity
public float computeTotalCapacity(Collection<Address> nodes, Map<Address,Float> capacityFactors)
-
computeExpectedSegments
public int computeExpectedSegments(int numSegments, int numOwners, Address node)
-
-