Package io.debezium.engine.spi
Class OffsetCommitPolicy.PeriodicCommitOffsetPolicy
- java.lang.Object
-
- io.debezium.engine.spi.OffsetCommitPolicy.PeriodicCommitOffsetPolicy
-
- All Implemented Interfaces:
OffsetCommitPolicy
- Enclosing interface:
- OffsetCommitPolicy
public static class OffsetCommitPolicy.PeriodicCommitOffsetPolicy extends Object implements OffsetCommitPolicy
AnOffsetCommitPolicythat will commit offsets no more than the specified time period. If the specified time is less than0then the policy will behave asOffsetCommitPolicy.AlwaysCommitOffsetPolicy.- See Also:
io.debezium.engine.DebeziumEngine.OFFSET_FLUSH_INTERVAL_MS
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.debezium.engine.spi.OffsetCommitPolicy
OffsetCommitPolicy.AlwaysCommitOffsetPolicy, OffsetCommitPolicy.PeriodicCommitOffsetPolicy
-
-
Field Summary
Fields Modifier and Type Field Description private DurationminimumTime
-
Constructor Summary
Constructors Constructor Description PeriodicCommitOffsetPolicy(Properties config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanperformCommit(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, wait
-
Methods inherited from interface io.debezium.engine.spi.OffsetCommitPolicy
and, or
-
-
-
-
Field Detail
-
minimumTime
private final Duration minimumTime
-
-
Constructor Detail
-
PeriodicCommitOffsetPolicy
public PeriodicCommitOffsetPolicy(Properties config)
-
-
Method Detail
-
performCommit
public boolean performCommit(long numberOfMessagesSinceLastCommit, Duration timeSinceLastCommit)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
-
-