org.infinispan.distribution.topologyaware
Class TopologyInfo

java.lang.Object
  extended by 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
TopologyInfo(Collection<Address> members)
           
 
Method Summary
 int computeMaxSegments(int numSegments, int numOwners, Address node)
           
 double computeMaxSegmentsForMachine(int numSegments, double numCopies, Collection<org.infinispan.distribution.topologyaware.TopologyInfo.Machine> machines, org.infinispan.distribution.topologyaware.TopologyInfo.Machine machine)
           
 double computeMaxSegmentsForNode(int numSegments, double numCopies, int nodesCount)
           
 double computeMaxSegmentsForRack(int numSegments, double numCopies, Collection<org.infinispan.distribution.topologyaware.TopologyInfo.Rack> racks, org.infinispan.distribution.topologyaware.TopologyInfo.Rack rack, org.infinispan.distribution.topologyaware.TopologyInfo.Machine machine)
           
 double computeMaxSegmentsForSite(int numSegments, double numCopies, Collection<org.infinispan.distribution.topologyaware.TopologyInfo.Site> sites, org.infinispan.distribution.topologyaware.TopologyInfo.Site site, org.infinispan.distribution.topologyaware.TopologyInfo.Rack rack, org.infinispan.distribution.topologyaware.TopologyInfo.Machine machine)
           
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TopologyInfo

public TopologyInfo(Collection<Address> members)
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)

getAllSites

public Set<String> getAllSites()

getSiteRacks

public Set<String> getSiteRacks(String site)

getRackMachines

public Set<String> getRackMachines(String site,
                                   String rack)

getAllSitesCount

public int getAllSitesCount()

getAllRacksCount

public int getAllRacksCount()

getAllMachinesCount

public int getAllMachinesCount()

getAllNodesCount

public int getAllNodesCount()

getDistinctLocationsCount

public int getDistinctLocationsCount(TopologyLevel level,
                                     int numOwners)

toString

public String toString()
Overrides:
toString in class Object

computeMaxSegmentsForNode

public double computeMaxSegmentsForNode(int numSegments,
                                        double numCopies,
                                        int nodesCount)

computeMaxSegmentsForMachine

public double computeMaxSegmentsForMachine(int numSegments,
                                           double numCopies,
                                           Collection<org.infinispan.distribution.topologyaware.TopologyInfo.Machine> machines,
                                           org.infinispan.distribution.topologyaware.TopologyInfo.Machine machine)

computeMaxSegmentsForRack

public double computeMaxSegmentsForRack(int numSegments,
                                        double numCopies,
                                        Collection<org.infinispan.distribution.topologyaware.TopologyInfo.Rack> racks,
                                        org.infinispan.distribution.topologyaware.TopologyInfo.Rack rack,
                                        org.infinispan.distribution.topologyaware.TopologyInfo.Machine machine)

computeMaxSegmentsForSite

public double computeMaxSegmentsForSite(int numSegments,
                                        double numCopies,
                                        Collection<org.infinispan.distribution.topologyaware.TopologyInfo.Site> sites,
                                        org.infinispan.distribution.topologyaware.TopologyInfo.Site site,
                                        org.infinispan.distribution.topologyaware.TopologyInfo.Rack rack,
                                        org.infinispan.distribution.topologyaware.TopologyInfo.Machine machine)

computeMaxSegments

public int computeMaxSegments(int numSegments,
                              int numOwners,
                              Address node)

-->

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.