Class GlobalHostStatusTracker


  • public class GlobalHostStatusTracker
    extends java.lang.Object
    Keeps track of HostSpec targets in a global map.
    • Constructor Detail

      • GlobalHostStatusTracker

        public GlobalHostStatusTracker()
    • Method Detail

      • reportHostStatus

        public static void reportHostStatus​(HostSpec hostSpec,
                                            HostStatus hostStatus)
        Store the actual observed host status.
        Parameters:
        hostSpec - The host whose status is known.
        hostStatus - Latest known status for the host.
      • getCandidateHosts

        static java.util.List<HostSpec> getCandidateHosts​(HostSpec[] hostSpecs,
                                                          HostRequirement targetServerType,
                                                          long hostRecheckMillis)
        Returns a list of candidate hosts that have the required targetServerType.
        Parameters:
        hostSpecs - The potential list of hosts.
        targetServerType - The required target server type.
        hostRecheckMillis - How stale information is allowed.
        Returns:
        candidate hosts to connect to.