Class ServiceEntry


  • public class ServiceEntry
    extends Object
    Holds properties of service, node and related checks
    Author:
    Ruslan Sennov
    • Constructor Detail

      • ServiceEntry

        public ServiceEntry()
        Default constructor
      • ServiceEntry

        public ServiceEntry​(ServiceEntry other)
        Copy constructor
        Parameters:
        other - the one to copy
      • ServiceEntry

        public ServiceEntry​(JsonObject json)
        Constructor from JSON
        Parameters:
        json - the JSON
    • Method Detail

      • toJson

        public JsonObject toJson()
        Convert to JSON
        Returns:
        the JSON
      • aggregatedStatus

        public CheckStatus aggregatedStatus()
        AggregatedStatus returns the "best" status for the list of health checks. Because a given entry may have many service and node-level health checks attached, this function determines the best representative of the status as as single string using the following heuristic: critical > warning > passing
        Returns:
        an aggregated status
      • getNode

        public Node getNode()
        Get node
        Returns:
        node
      • getService

        public Service getService()
        Get service
        Returns:
        service
      • getChecks

        public List<Check> getChecks()
        Get list of checks
        Returns:
        list of checks
      • setNode

        public ServiceEntry setNode​(Node node)
        Set node
        Parameters:
        node - node
        Returns:
        reference to this, for fluency
      • setService

        public ServiceEntry setService​(Service service)
        Set service
        Parameters:
        service - service
        Returns:
        reference to this, for fluency
      • setChecks

        public ServiceEntry setChecks​(List<Check> checks)
        Set list of checks
        Parameters:
        checks - list of checks
        Returns:
        reference to this, for fluency
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object