Package org.apache.cassandra.locator
Interface ReplicaCollection.Builder<C extends ReplicaCollection<C>>
-
- All Superinterfaces:
java.lang.Iterable<Replica>
,ReplicaCollection<C>
- All Known Implementing Classes:
EndpointsForRange.Builder
,EndpointsForToken.Builder
,RangesAtEndpoint.Builder
- Enclosing interface:
- ReplicaCollection<C extends ReplicaCollection<C>>
public static interface ReplicaCollection.Builder<C extends ReplicaCollection<C>> extends ReplicaCollection<C>
A mutable (append-only) extension of a ReplicaCollection. All methods besides add() will return an immutable snapshot of the collection, or the matching items.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ReplicaCollection.Builder.Conflict
Passed to add() and addAll() as ignoreConflicts parameter.-
Nested classes/interfaces inherited from interface org.apache.cassandra.locator.ReplicaCollection
ReplicaCollection.Builder<C extends ReplicaCollection<C>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ReplicaCollection.Builder<C>
add(Replica replica)
ReplicaCollection.Builder<C>
add(Replica replica, ReplicaCollection.Builder.Conflict ignoreConflict)
default ReplicaCollection.Builder<C>
addAll(java.lang.Iterable<Replica> replicas)
default ReplicaCollection.Builder<C>
addAll(java.lang.Iterable<Replica> replicas, ReplicaCollection.Builder.Conflict ignoreConflicts)
C
build()
C
snapshot()
-
-
-
Method Detail
-
build
C build()
- 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.
-
snapshot
C snapshot()
- Returns:
- an Immutable clone that assumes this Builder will be modified again
-
add
ReplicaCollection.Builder<C> add(Replica replica, ReplicaCollection.Builder.Conflict ignoreConflict)
- Parameters:
replica
- add this replica to the end of the collectionignoreConflict
- conflicts to ignore, seeReplicaCollection.Builder.Conflict
-
add
default ReplicaCollection.Builder<C> add(Replica replica)
-
addAll
default ReplicaCollection.Builder<C> addAll(java.lang.Iterable<Replica> replicas, ReplicaCollection.Builder.Conflict ignoreConflicts)
-
addAll
default ReplicaCollection.Builder<C> addAll(java.lang.Iterable<Replica> replicas)
-
-