Package io.debezium.engine.spi
Class OffsetCommitPolicy.AlwaysCommitOffsetPolicy
java.lang.Object
io.debezium.engine.spi.OffsetCommitPolicy.AlwaysCommitOffsetPolicy
- All Implemented Interfaces:
OffsetCommitPolicy
- Enclosing interface:
- OffsetCommitPolicy
public static class OffsetCommitPolicy.AlwaysCommitOffsetPolicy
extends Object
implements OffsetCommitPolicy
An
OffsetCommitPolicy that will commit offsets as frequently as possible. This may result in reduced
performance, but it has the least potential for seeing source records more than once upon restart.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.engine.spi.OffsetCommitPolicy
OffsetCommitPolicy.AlwaysCommitOffsetPolicy, OffsetCommitPolicy.PeriodicCommitOffsetPolicy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanperformCommit(long numberOfMessagesSinceLastCommit, Duration timeSinceLastCommit) Determine if a commit of the offsets should be performed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.engine.spi.OffsetCommitPolicy
and, or
-
Constructor Details
-
AlwaysCommitOffsetPolicy
public AlwaysCommitOffsetPolicy()
-
-
Method Details
-
performCommit
Description copied from interface:OffsetCommitPolicyDetermine if a commit of the offsets should be performed.- Specified by:
performCommitin interfaceOffsetCommitPolicy- Parameters:
numberOfMessagesSinceLastCommit- the number of messages that have been received from the connector since last the offsets were last committed; never negativetimeSinceLastCommit- the time that has elapsed since the offsets were last committed; never negative- Returns:
trueif the offsets should be committed, orfalseotherwise
-