Class AbstractDNSToSwitchMapping

    • Constructor Detail

      • AbstractDNSToSwitchMapping

        protected AbstractDNSToSwitchMapping()
        Create an unconfigured instance.
    • Method Detail

      • isSingleSwitch

        public boolean isSingleSwitch()
        Predicate that indicates that the switch mapping is known to be single-switch. The base class returns false: it assumes all mappings are multi-rack. Subclasses may override this with methods that are more aware of their topologies.
        Returns:
        true if the mapping thinks that it is on a single switch
      • getSwitchMap

        public Map<String,​String> getSwitchMap()
        Get a copy of the map (for diagnostics).
        Returns:
        a clone of the map or null for none known
      • dumpTopology

        public String dumpTopology()
        Generate a string listing the switch mapping implementation, the mapping for every known node and the number of nodes and unique switches known about -each entry to a separate line.
        Returns:
        a string that can be presented to the ops team or used in debug messages.