Package io.debezium.heartbeat
Interface Heartbeat.ScheduledHeartbeat
- All Superinterfaces:
AutoCloseable,Heartbeat
- All Known Implementing Classes:
CompositeHeartbeat,HeartbeatImpl
- Enclosing interface:
Heartbeat
A class that is able to generate periodic heartbeat messages based on a pre-configured interval. The clients are
supposed to call method
emitWithDelay(Map, OffsetContext) from a main loop of a connector.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.heartbeat.Heartbeat
Heartbeat.OffsetProducer, Heartbeat.ScheduledHeartbeat -
Field Summary
FieldsFields inherited from interface io.debezium.heartbeat.Heartbeat
DEFAULT_NOOP_HEARTBEAT, HEARTBEAT_INTERVAL, HEARTBEAT_INTERVAL_PROPERTY_NAME, HEARTBEAT_TOPICS_PREFIX -
Method Summary
Modifier and TypeMethodDescriptiondefault voidemitWithDelay(Map<String, ?> partition, OffsetContext offset) Generates a heartbeat record if defined time has elapseddefault booleanexpired()default voidreset()reset the timer for the heartbeat
-
Field Details
-
NOOP_HEARTBEAT
-
-
Method Details
-
emitWithDelay
default void emitWithDelay(Map<String, ?> partition, OffsetContext offset) throws InterruptedExceptionGenerates a heartbeat record if defined time has elapsed- Parameters:
partition- partition for the heartbeat recordoffset- offset for the heartbeat record- Throws:
InterruptedException
-
expired
default boolean expired()- Returns:
- if the timeout for the scheduled heartbeat is expired
-
reset
default void reset()reset the timer for the heartbeat
-