Package org.apache.cassandra.locator
Class EndpointsForToken
java.lang.Object
org.apache.cassandra.locator.AbstractReplicaCollection<E>
org.apache.cassandra.locator.Endpoints<EndpointsForToken>
org.apache.cassandra.locator.EndpointsForToken
- All Implemented Interfaces:
Iterable<Replica>,ReplicaCollection<EndpointsForToken>
- Direct Known Subclasses:
EndpointsForToken.Builder
A ReplicaCollection where all Replica are required to cover a range that fully contains the token() defined in the builder().
Endpoints are guaranteed to be unique; on construction, this is enforced unless optionally silenced (in which case
only the first occurrence makes the cut).
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.cassandra.locator.AbstractReplicaCollection
AbstractReplicaCollection.ReplicaList, AbstractReplicaCollection.ReplicaMap<K> -
Field Summary
Fields inherited from class org.apache.cassandra.locator.AbstractReplicaCollection
EMPTY_LIST, list -
Method Summary
Modifier and TypeMethodDescriptionstatic EndpointsForToken.Builderstatic EndpointsForToken.Builderstatic EndpointsForTokenstatic EndpointsForTokencopyOf(Token token, Collection<Replica> replicas) static EndpointsForTokenlookup(InetAddressAndPort endpoint) static EndpointsForTokenstatic EndpointsForTokennatural(AbstractReplicationStrategy replicationStrategy, Token token) static EndpointsForTokennatural(TableMetadata table, Token token) newBuilder(int initialCapacity) construct a new Builder of our own type, so that we can concatenate TODO: this isn't terribly pretty, but we need sometimes to select / merge two Endpoints of unknown type;static EndpointsForTokenstatic EndpointsForTokenstatic EndpointsForTokenstatic EndpointsForTokenstatic EndpointsForTokenpending(TableMetadata table, Token token) snapshot()protected EndpointsForTokentoken()Methods inherited from class org.apache.cassandra.locator.Endpoints
append, byEndpoint, concat, contains, contains, endpoint, endpointList, endpoints, keep, select, selfIfPresent, without, withoutSelfMethods inherited from class org.apache.cassandra.locator.AbstractReplicaCollection
anyMatch, asList, collector, count, equals, filter, filter, filterLazily, filterLazily, forEach, get, hashCode, isEmpty, iterator, size, sorted, stream, subList, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
spliterator
-
Method Details
-
token
-
newBuilder
Description copied from class:AbstractReplicaCollectionconstruct a new Builder of our own type, so that we can concatenate TODO: this isn't terribly pretty, but we need sometimes to select / merge two Endpoints of unknown type;- Specified by:
newBuilderin classAbstractReplicaCollection<EndpointsForToken>
-
snapshot
- Specified by:
snapshotin classAbstractReplicaCollection<EndpointsForToken>
-
snapshot
-
lookup
-
builder
-
builder
-
empty
-
of
-
of
-
copyOf
-
copyOf
-
natural
-
natural
public static EndpointsForToken natural(AbstractReplicationStrategy replicationStrategy, Token token) -
natural
-
pending
-
pending
-
pending
-