Package io.debezium.connector.mongodb
Class ReplicaSetDiscovery
- java.lang.Object
-
- io.debezium.connector.mongodb.ReplicaSetDiscovery
-
@ThreadSafe public class ReplicaSetDiscovery extends Object
A component that monitors a single replica set or the set of replica sets that make up the shards in a sharded cluster.- Author:
- Randall Hauch
-
-
Field Summary
Fields Modifier and Type Field Description static StringADMIN_DATABASE_NAMEThe database that might be used to check for member information in a replica set.static StringCONFIG_DATABASE_NAMEThe database that might be used to check for replica set information in a sharded cluster.private MongoDbTaskContextcontextprivate static org.slf4j.LoggerLOGGERprivate StringseedAddresses
-
Constructor Summary
Constructors Constructor Description ReplicaSetDiscovery(MongoDbTaskContext context)Create a cluster component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReplicaSetsgetReplicaSets()Connect to the shard cluster or replica set defined by the seed addresses, and obtain the specifications for each of the replica sets.
-
-
-
Field Detail
-
CONFIG_DATABASE_NAME
public static final String CONFIG_DATABASE_NAME
The database that might be used to check for replica set information in a sharded cluster.- See Also:
- Constant Field Values
-
ADMIN_DATABASE_NAME
public static final String ADMIN_DATABASE_NAME
The database that might be used to check for member information in a replica set.- See Also:
- Constant Field Values
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
context
private final MongoDbTaskContext context
-
seedAddresses
private final String seedAddresses
-
-
Constructor Detail
-
ReplicaSetDiscovery
public ReplicaSetDiscovery(MongoDbTaskContext context)
Create a cluster component.- Parameters:
context- the replication context; may not be null
-
-
Method Detail
-
getReplicaSets
public ReplicaSets getReplicaSets()
Connect to the shard cluster or replica set defined by the seed addresses, and obtain the specifications for each of the replica sets.- Returns:
- the information about the replica sets; never null but possibly empty
-
-