Package org.apache.cassandra.locator
Class EndpointsForRange.Builder
- java.lang.Object
-
- org.apache.cassandra.locator.AbstractReplicaCollection<E>
-
- org.apache.cassandra.locator.Endpoints<EndpointsForRange>
-
- org.apache.cassandra.locator.EndpointsForRange
-
- org.apache.cassandra.locator.EndpointsForRange.Builder
-
- All Implemented Interfaces:
java.lang.Iterable<Replica>
,ReplicaCollection<EndpointsForRange>
,ReplicaCollection.Builder<EndpointsForRange>
- Enclosing class:
- EndpointsForRange
public static class EndpointsForRange.Builder extends EndpointsForRange implements ReplicaCollection.Builder<EndpointsForRange>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.locator.EndpointsForRange
EndpointsForRange.Builder
-
Nested 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EndpointsForRange.Builder
add(Replica replica, ReplicaCollection.Builder.Conflict ignoreConflict)
EndpointsForRange
build()
EndpointsForRange
snapshot()
-
Methods inherited from class org.apache.cassandra.locator.EndpointsForRange
builder, builder, copyOf, empty, forToken, newBuilder, of, of, range
-
Methods inherited from class org.apache.cassandra.locator.Endpoints
append, byEndpoint, concat, contains, contains, endpoint, endpointList, endpoints, keep, select, selfIfPresent, without, withoutSelf
-
Methods 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, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.locator.ReplicaCollection
contains, count, endpoints, equals, filter, filter, filterLazily, filterLazily, get, hashCode, isEmpty, iterator, size, sorted, stream, subList, toString
-
Methods inherited from interface org.apache.cassandra.locator.ReplicaCollection.Builder
add, addAll, addAll
-
-
-
-
Method Detail
-
add
public EndpointsForRange.Builder add(Replica replica, ReplicaCollection.Builder.Conflict ignoreConflict)
- Specified by:
add
in interfaceReplicaCollection.Builder<EndpointsForRange>
- Parameters:
replica
- add this replica to the end of the collectionignoreConflict
- conflicts to ignore, seeReplicaCollection.Builder.Conflict
-
snapshot
public EndpointsForRange snapshot()
- Specified by:
snapshot
in interfaceReplicaCollection.Builder<EndpointsForRange>
- Overrides:
snapshot
in classEndpointsForRange
- Returns:
- an Immutable clone that assumes this Builder will be modified again
-
build
public EndpointsForRange build()
- Specified by:
build
in interfaceReplicaCollection.Builder<EndpointsForRange>
- 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.
-
-