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, waitgetDatacenter, getDatacenter, getLocalDatacenter, getLocalRack, getRack, validatepublic abstract int compareEndpoints(InetAddressAndPort target, Replica r1, Replica r2)
IEndpointSnitchcompareEndpoints in interface IEndpointSnitchpublic <C extends ReplicaCollection<? extends C>> C sortedByProximity(InetAddressAndPort address, C unsortedAddress)
sortedByProximity in interface IEndpointSnitchaddress - the address to sort by proximity tounsortedAddress - the nodes to sortpublic void gossiperStarting()
IEndpointSnitchgossiperStarting in interface IEndpointSnitchpublic boolean isWorthMergingForRangeQuery(ReplicaCollection<?> merged, ReplicaCollection<?> l1, ReplicaCollection<?> l2)
IEndpointSnitchisWorthMergingForRangeQuery in interface IEndpointSnitchCopyright © 2009-2022 The Apache Software Foundation