Class LatencyAwarePolicy.Snapshot

  • Enclosing class:
    LatencyAwarePolicy

    public static class LatencyAwarePolicy.Snapshot
    extends Object
    An immutable snapshot of the per-host scores (and stats in general) maintained by LatencyAwarePolicy to base its decision upon.
    • Method Detail

      • getAllStats

        public Map<Host,​LatencyAwarePolicy.Snapshot.Stats> getAllStats()
        A map with the stats for all hosts tracked by the LatencyAwarePolicy at the time of the snapshot.
        Returns:
        a immutable map with all the stats contained in this snapshot.
      • getStats

        public LatencyAwarePolicy.Snapshot.Stats getStats​(Host host)
        The Stats object for a given host.
        Parameters:
        host - the host to return the stats of.
        Returns:
        the Stats for host in this snapshot or null if the snapshot has not information on host.