Package io.debezium.connector.mongodb
Class AbstractMongoIT
- java.lang.Object
-
- io.debezium.connector.mongodb.AbstractMongoIT
-
- All Implemented Interfaces:
Testing
- Direct Known Subclasses:
ConnectionIT,MongoUtilIT
public abstract class AbstractMongoIT extends Object implements Testing
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.debezium.util.Testing
Testing.Debug, Testing.Files, Testing.InterruptableFunction, Testing.Network, Testing.Print, Testing.Timer
-
-
Field Summary
Fields Modifier and Type Field Description protected Configurationconfigprotected io.debezium.connector.mongodb.MongoDbTaskContextcontextprotected static org.slf4j.Loggerloggerprotected io.debezium.connector.mongodb.ConnectionContext.MongoPrimaryprimaryprotected io.debezium.connector.mongodb.ReplicaSetreplicaSet
-
Constructor Summary
Constructors Constructor Description AbstractMongoIT()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterEach()voidbeforeEach()protected BiConsumer<String,Throwable>connectionErrorHandler(int numErrorsBeforeFailing)private voidinitialize(boolean restartFromBeginning)A method that will initialize the state after the configuration is changed.protected voidreuseConfiguration(Configuration config)A method that will initialize the state after the configuration is changed, reusing the same partition offsets that were previously used.protected voiduseConfiguration(Configuration config)A method that will initialize the state after the configuration is changed.
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
config
protected Configuration config
-
context
protected io.debezium.connector.mongodb.MongoDbTaskContext context
-
replicaSet
protected io.debezium.connector.mongodb.ReplicaSet replicaSet
-
primary
protected io.debezium.connector.mongodb.ConnectionContext.MongoPrimary primary
-
-
Method Detail
-
beforeEach
public void beforeEach()
-
useConfiguration
protected void useConfiguration(Configuration config)
A method that will initialize the state after the configuration is changed.- Parameters:
config- the configuration; may not be null
-
reuseConfiguration
protected void reuseConfiguration(Configuration config)
A method that will initialize the state after the configuration is changed, reusing the same partition offsets that were previously used.- Parameters:
config- the configuration; may not be null
-
initialize
private void initialize(boolean restartFromBeginning)
A method that will initialize the state after the configuration is changed.- Parameters:
restartFromBeginning-trueif the context should have no prior partition offsets, orfalseif the partition offsets that exist at this time should be reused
-
afterEach
public void afterEach()
-
connectionErrorHandler
protected BiConsumer<String,Throwable> connectionErrorHandler(int numErrorsBeforeFailing)
-
-