Package org.apache.cassandra.net
Class LatencySubscribers
- java.lang.Object
-
- org.apache.cassandra.net.LatencySubscribers
-
public class LatencySubscribers extends java.lang.Object
Callback thatDynamicEndpointSnitch
listens to in order to update host scores. FIXME: rename/specialise, since only used by DES?
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LatencySubscribers.Subscriber
-
Constructor Summary
Constructors Constructor Description LatencySubscribers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(InetAddressAndPort address, long latency, java.util.concurrent.TimeUnit unit)
void
maybeAdd(RequestCallback cb, InetAddressAndPort address, long latency, java.util.concurrent.TimeUnit unit)
Track latency information for the dynamic snitchvoid
subscribe(LatencySubscribers.Subscriber subscriber)
-
-
-
Method Detail
-
subscribe
public void subscribe(LatencySubscribers.Subscriber subscriber)
-
add
public void add(InetAddressAndPort address, long latency, java.util.concurrent.TimeUnit unit)
-
maybeAdd
public void maybeAdd(RequestCallback cb, InetAddressAndPort address, long latency, java.util.concurrent.TimeUnit unit)
Track latency information for the dynamic snitch- Parameters:
cb
- the callback associated with this message -- this lets us know if it's a message type we're interested inaddress
- the host that replied to the message
-
-