Class ReplicaSet
java.lang.Object
io.debezium.connector.mongodb.connection.ReplicaSet
- All Implemented Interfaces:
Comparable<ReplicaSet>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionReplicaSet(com.mongodb.ConnectionString connectionString) ReplicaSet(String connectionString) privateReplicaSet(String replicaSetName, com.mongodb.ConnectionString connectionString) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ReplicaSet that) com.mongodb.ConnectionStringGet connection stringbooleanstatic ReplicaSetforCluster(com.mongodb.ConnectionString connectionString) Creates a fake replica set representing entire sharded clusterstatic ReplicaSetforCluster(String connectionString) Same asforCluster(ConnectionString)inthashCode()booleanReturn whether the address(es) represents a replica set, where thereplica set nameis notnull.Get the name of this replica set.toString()
-
Field Details
-
CLUSTER_RS_NAME
- See Also:
-
replicaSetName
-
connectionString
private final com.mongodb.ConnectionString connectionString -
hc
private final int hc
-
-
Constructor Details
-
ReplicaSet
-
ReplicaSet
public ReplicaSet(com.mongodb.ConnectionString connectionString) -
ReplicaSet
-
-
Method Details
-
forCluster
Creates a fake replica set representing entire sharded cluster- Parameters:
connectionString- connection string for sharded cluster- Returns:
- sharded cluster as fake replica set
-
forCluster
Same asforCluster(ConnectionString) -
replicaSetName
Get the name of this replica set.- Returns:
- the replica set name, or
nullif the addresses are for standalone servers.
-
connectionString
public com.mongodb.ConnectionString connectionString()Get connection string- Returns:
- connection string for this replica set
-
hasReplicaSetName
public boolean hasReplicaSetName()Return whether the address(es) represents a replica set, where thereplica set nameis notnull.- Returns:
trueif this represents the address of a replica set, orfalseif it represents the address of a standalone server
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<ReplicaSet>
-
toString
-