Package org.apache.cassandra.locator
Class RangesAtEndpoint.Builder
- java.lang.Object
-
- org.apache.cassandra.locator.AbstractReplicaCollection<RangesAtEndpoint>
-
- org.apache.cassandra.locator.RangesAtEndpoint
-
- org.apache.cassandra.locator.RangesAtEndpoint.Builder
-
- All Implemented Interfaces:
java.lang.Iterable<Replica>
,ReplicaCollection<RangesAtEndpoint>
,ReplicaCollection.Builder<RangesAtEndpoint>
- Enclosing class:
- RangesAtEndpoint
public static class RangesAtEndpoint.Builder extends RangesAtEndpoint implements ReplicaCollection.Builder<RangesAtEndpoint>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.locator.RangesAtEndpoint
RangesAtEndpoint.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
-
-
Constructor Summary
Constructors Constructor Description Builder(InetAddressAndPort endpoint)
Builder(InetAddressAndPort endpoint, int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RangesAtEndpoint.Builder
add(Replica replica)
RangesAtEndpoint.Builder
add(Replica replica, ReplicaCollection.Builder.Conflict ignoreConflict)
RangesAtEndpoint
build()
RangesAtEndpoint
snapshot()
-
Methods inherited from class org.apache.cassandra.locator.RangesAtEndpoint
builder, builder, byRange, collector, concat, contains, contains, copyOf, empty, endpoint, endpoints, isDummyList, newBuilder, of, of, onlyFull, onlyTransient, ranges, snapshot, toDummyList, unwrap
-
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
addAll, addAll
-
-
-
-
Constructor Detail
-
Builder
public Builder(InetAddressAndPort endpoint)
-
Builder
public Builder(InetAddressAndPort endpoint, int capacity)
-
-
Method Detail
-
add
public RangesAtEndpoint.Builder add(Replica replica)
- Specified by:
add
in interfaceReplicaCollection.Builder<RangesAtEndpoint>
-
add
public RangesAtEndpoint.Builder add(Replica replica, ReplicaCollection.Builder.Conflict ignoreConflict)
- Specified by:
add
in interfaceReplicaCollection.Builder<RangesAtEndpoint>
- Parameters:
replica
- add this replica to the end of the collectionignoreConflict
- conflicts to ignore, seeReplicaCollection.Builder.Conflict
-
snapshot
public RangesAtEndpoint snapshot()
- Specified by:
snapshot
in interfaceReplicaCollection.Builder<RangesAtEndpoint>
- Overrides:
snapshot
in classRangesAtEndpoint
- Returns:
- an Immutable clone that assumes this Builder will be modified again
-
build
public RangesAtEndpoint build()
- Specified by:
build
in interfaceReplicaCollection.Builder<RangesAtEndpoint>
- 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.
-
-