Class BoxHealth


  • public class BoxHealth
    extends Object
    A snapshot of the health of the Box system.
    Author:
    Charles Draper
    • Constructor Detail

      • BoxHealth

        public BoxHealth​(boolean healthy,
                         Map<String,​SourceHealth> sourceHealthMap)
        Creates a new BoxHealth initialized with the given health information.
        Parameters:
        healthy - whether or not the overall health of box is good
        sourceHealthMap - the health information for all sources keyed by sourceName
    • Method Detail

      • isHealthy

        public boolean isHealthy()
        Returns whether this box is healthy.
        Returns:
        whether or not the overall health of box is good
      • getSourceHealth

        public SourceHealth getSourceHealth​(String sourceName)
        Returns the health of the given source.
        Parameters:
        sourceName - the sourceName
        Returns:
        the health for a particular source
      • getSourceHealthMap

        public Map<String,​SourceHealth> getSourceHealthMap()
        Returns the health information for all sources keyed by sourceName.
        Returns:
        the health information for all sources keyed by sourceName