com.datastax.driver.core.policies
Class LatencyAwarePolicy.Snapshot

java.lang.Object
  extended by 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 by LatencyAwarePolicy to base its decision upon.


Nested Class Summary
static class LatencyAwarePolicy.Snapshot.Stats
          A snapshot of the statistics on a given host kept by LatencyAwarePolicy.
 
Method Summary
 Map<Host,LatencyAwarePolicy.Snapshot.Stats> getAllStats()
          A map with the stats for all hosts tracked by the LatencyAwarePolicy at the time of the snapshot.
 LatencyAwarePolicy.Snapshot.Stats getStats(Host host)
          The Stats object for a given host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


Copyright © 2014. All rights reserved.