Package org.apache.cassandra.locator
Class EndpointsForToken.Builder
java.lang.Object
org.apache.cassandra.locator.AbstractReplicaCollection<E>
org.apache.cassandra.locator.Endpoints<EndpointsForToken>
org.apache.cassandra.locator.EndpointsForToken
org.apache.cassandra.locator.EndpointsForToken.Builder
- All Implemented Interfaces:
Iterable<Replica>,ReplicaCollection<EndpointsForToken>,ReplicaCollection.Builder<EndpointsForToken>
- Enclosing class:
- EndpointsForToken
public static class EndpointsForToken.Builder
extends EndpointsForToken
implements ReplicaCollection.Builder<EndpointsForToken>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.locator.EndpointsForToken
EndpointsForToken.BuilderNested classes/interfaces inherited from class org.apache.cassandra.locator.AbstractReplicaCollection
AbstractReplicaCollection.ReplicaList, AbstractReplicaCollection.ReplicaMap<K>Nested classes/interfaces inherited from interface org.apache.cassandra.locator.ReplicaCollection
ReplicaCollection.Builder<C extends ReplicaCollection<C>>Nested classes/interfaces inherited from interface org.apache.cassandra.locator.ReplicaCollection.Builder
ReplicaCollection.Builder.Conflict -
Field Summary
Fields inherited from class org.apache.cassandra.locator.AbstractReplicaCollection
EMPTY_LIST, list -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(Replica replica, ReplicaCollection.Builder.Conflict ignoreConflict) build()snapshot()Methods inherited from class org.apache.cassandra.locator.EndpointsForToken
builder, builder, copyOf, copyOf, empty, lookup, natural, natural, natural, newBuilder, of, of, pending, pending, pending, snapshot, tokenMethods 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
forEach, spliteratorMethods inherited from interface org.apache.cassandra.locator.ReplicaCollection
contains, count, endpoints, equals, filter, filter, filterLazily, filterLazily, get, hashCode, isEmpty, iterator, size, sorted, stream, subList, toStringMethods inherited from interface org.apache.cassandra.locator.ReplicaCollection.Builder
add, addAll, addAll
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
add
public EndpointsForToken.Builder add(Replica replica, ReplicaCollection.Builder.Conflict ignoreConflict) - Specified by:
addin interfaceReplicaCollection.Builder<EndpointsForToken>- Parameters:
replica- add this replica to the end of the collectionignoreConflict- conflicts to ignore, seeReplicaCollection.Builder.Conflict
-
snapshot
- Specified by:
snapshotin interfaceReplicaCollection.Builder<EndpointsForToken>- Overrides:
snapshotin classEndpointsForToken- Returns:
- an Immutable clone that assumes this Builder will be modified again
-
build
- Specified by:
buildin interfaceReplicaCollection.Builder<EndpointsForToken>- Returns:
- an Immutable clone that assumes this Builder will never be modified again, so its contents can be reused. This Builder should enforce that it is no longer modified.
-