Class LatencyAwarePolicy.Snapshot
- java.lang.Object
-
- com.datastax.driver.core.policies.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 byLatencyAwarePolicyto base its decision upon.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLatencyAwarePolicy.Snapshot.StatsA snapshot of the statistics on a given host kept byLatencyAwarePolicy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Host,LatencyAwarePolicy.Snapshot.Stats>getAllStats()A map with the stats for all hosts tracked by theLatencyAwarePolicyat the time of the snapshot.LatencyAwarePolicy.Snapshot.StatsgetStats(Host host)TheStatsobject for a given host.
-
-
-
Method Detail
-
getAllStats
public Map<Host,LatencyAwarePolicy.Snapshot.Stats> getAllStats()
A map with the stats for all hosts tracked by theLatencyAwarePolicyat 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)
TheStatsobject for a given host.- Parameters:
host- the host to return the stats of.- Returns:
- the
Statsforhostin this snapshot ornullif the snapshot has not information onhost.
-
-