public abstract class AbstractEndpointSnitch extends java.lang.Object implements IEndpointSnitch
Constructor and Description |
---|
AbstractEndpointSnitch() |
Modifier and Type | Method and Description |
---|---|
abstract int |
compareEndpoints(InetAddressAndPort target,
Replica r1,
Replica r2)
compares two endpoints in relation to the target endpoint, returning as Comparator.compare would
|
void |
gossiperStarting()
called after Gossiper instance exists immediately before it starts gossiping
|
boolean |
isWorthMergingForRangeQuery(ReplicaCollection<?> merged,
ReplicaCollection<?> l1,
ReplicaCollection<?> l2)
Returns whether for a range query doing a query against merged is likely
to be faster than 2 sequential queries, one against l1 followed by one against l2.
|
<C extends ReplicaCollection<? extends C>> |
sortedByProximity(InetAddressAndPort address,
C unsortedAddress)
Sorts the Collection of node addresses by proximity to the given address
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatacenter, getDatacenter, getDatacenter, getLocalDatacenter, getLocalRack, getRack, validate
public abstract int compareEndpoints(InetAddressAndPort target, Replica r1, Replica r2)
IEndpointSnitch
compareEndpoints
in interface IEndpointSnitch
public <C extends ReplicaCollection<? extends C>> C sortedByProximity(InetAddressAndPort address, C unsortedAddress)
sortedByProximity
in interface IEndpointSnitch
address
- the address to sort by proximity tounsortedAddress
- the nodes to sortpublic void gossiperStarting()
IEndpointSnitch
gossiperStarting
in interface IEndpointSnitch
public boolean isWorthMergingForRangeQuery(ReplicaCollection<?> merged, ReplicaCollection<?> l1, ReplicaCollection<?> l2)
IEndpointSnitch
isWorthMergingForRangeQuery
in interface IEndpointSnitch
Copyright © 2009-2022 The Apache Software Foundation