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
-
-
Constructor Summary
Constructors Constructor Description TopologyInfo(int numSegments, int numOwners, Collection<Address> members, Map<Address,Float> capacityFactors)
TopologyInfo(ConsistentHash ch)
-
Method Summary
-
-
-
Constructor Detail
-
TopologyInfo
public TopologyInfo(ConsistentHash ch)
-
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, org.infinispan.distribution.topologyaware.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)
-
-