Package io.debezium.connector.mongodb
Class ReplicaSets
java.lang.Object
io.debezium.connector.mongodb.ReplicaSets
A set of replica set specifications.
- Author:
- Randall Hauch
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReplicaSets(Collection<ReplicaSet> rsSpecs) Create a set of replica set specifications. -
Method Summary
Modifier and TypeMethodDescriptionall()Get a copy of all of theReplicaSetobjects.static ReplicaSetsempty()Get an instance that contains no replica sets.booleaninthashCode()booleanhaveChangedSince(ReplicaSets priorState) Determine if one or more replica sets has been added or removed since the prior state.static ReplicaSetsof(ReplicaSet... replicaSets) voidonEachReplicaSet(Consumer<ReplicaSet> function) Perform the supplied function on each of the replica setsintsize()Get the number of replica sets.voidsubdivide(int maxSubdivisionCount, Consumer<ReplicaSets> subdivisionConsumer) Subdivide this collection of replica sets into the maximum number of groups.toString()
-
Field Details
-
replicaSets
-
-
Constructor Details
-
ReplicaSets
Create a set of replica set specifications.- Parameters:
rsSpecs- the replica set specifications; may be null or empty
-
-
Method Details
-
empty
Get an instance that contains no replica sets.- Returns:
- the empty instance; never null
-
of
-
size
public int size()Get the number of replica sets.- Returns:
- the replica set count
-
onEachReplicaSet
Perform the supplied function on each of the replica sets- Parameters:
function- the consumer function; may not be null
-
subdivide
Subdivide this collection of replica sets into the maximum number of groups.- Parameters:
maxSubdivisionCount- the maximum number of subdivisionssubdivisionConsumer- the function to be called with each subdivision; may not be null
-
all
Get a copy of all of theReplicaSetobjects.- Returns:
- the replica set objects; never null but possibly empty
-
haveChangedSince
Determine if one or more replica sets has been added or removed since the prior state.- Parameters:
priorState- the prior state of the replica sets; may be null- Returns:
trueif the replica sets have changed since the prior state, orfalseotherwise
-
hashCode
public int hashCode() -
equals
-
toString
-