Package io.debezium.heartbeat
Class CompositeHeartbeat
java.lang.Object
io.debezium.heartbeat.CompositeHeartbeat
- All Implemented Interfaces:
Heartbeat,Heartbeat.ScheduledHeartbeat,AutoCloseable
Composite Heartbeat solutions (Queue, Database...)
Heartbeat. It executes the heartbeats in chain- Author:
- gpanice
-
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_PREFIXFields inherited from interface io.debezium.heartbeat.Heartbeat.ScheduledHeartbeat
NOOP_HEARTBEAT -
Constructor Summary
ConstructorsConstructorDescriptionCompositeHeartbeat(Heartbeat.ScheduledHeartbeat scheduledHeartbeat, Heartbeat... heartbeat) CompositeHeartbeat(Heartbeat.ScheduledHeartbeat scheduledHeartbeat, List<Heartbeat> heartbeats) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidemit(Map<String, ?> partition, OffsetContext offset) Generates a heartbeat record unconditionallyvoidemitWithDelay(Map<String, ?> partition, OffsetContext offset) Generates a heartbeat record if defined time has elapsedvoidforcedBeat(Map<String, ?> partition, Map<String, ?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Generates a heartbeat record unconditionally Replaced byHeartbeat.emit(Map, OffsetContext)voidheartbeat(Map<String, ?> partition, Heartbeat.OffsetProducer offsetProducer, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Generates a heartbeat record if defined time has elapsed Replaced byHeartbeat.ScheduledHeartbeat.emitWithDelay(Map, OffsetContext)voidheartbeat(Map<String, ?> partition, Map<String, ?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Generates a heartbeat record if defined time has elapsed Replaced byHeartbeat.ScheduledHeartbeat.emitWithDelay(Map, OffsetContext)booleanWhether heartbeats are enabled or not.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.heartbeat.Heartbeat.ScheduledHeartbeat
expired, reset
-
Field Details
-
scheduledHeartbeat
-
heartbeats
-
-
Constructor Details
-
CompositeHeartbeat
-
CompositeHeartbeat
public CompositeHeartbeat(Heartbeat.ScheduledHeartbeat scheduledHeartbeat, List<Heartbeat> heartbeats)
-
-
Method Details
-
heartbeat
public void heartbeat(Map<String, ?> partition, Map<String, throws InterruptedException?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Description copied from interface:HeartbeatGenerates a heartbeat record if defined time has elapsed Replaced byHeartbeat.ScheduledHeartbeat.emitWithDelay(Map, OffsetContext)- Specified by:
heartbeatin interfaceHeartbeat- Parameters:
partition- partition for the heartbeat recordoffset- offset for the heartbeat recordconsumer- - a code to place record among others to be sent into Connect- Throws:
InterruptedException
-
heartbeat
public void heartbeat(Map<String, ?> partition, Heartbeat.OffsetProducer offsetProducer, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) throws InterruptedExceptionDescription copied from interface:HeartbeatGenerates a heartbeat record if defined time has elapsed Replaced byHeartbeat.ScheduledHeartbeat.emitWithDelay(Map, OffsetContext)- Specified by:
heartbeatin interfaceHeartbeat- Parameters:
partition- partition for the heartbeat recordoffsetProducer- lazily calculated offset for the heartbeat recordconsumer- - a code to place record among others to be sent into Connect- Throws:
InterruptedException
-
forcedBeat
public void forcedBeat(Map<String, ?> partition, Map<String, throws InterruptedException?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Description copied from interface:HeartbeatGenerates a heartbeat record unconditionally Replaced byHeartbeat.emit(Map, OffsetContext)- Specified by:
forcedBeatin interfaceHeartbeat- Parameters:
partition- partition for the heartbeat recordoffset- offset for the heartbeat recordconsumer- - a code to place record among others to be sent into Connect- Throws:
InterruptedException
-
emitWithDelay
public void emitWithDelay(Map<String, ?> partition, OffsetContext offset) throws InterruptedExceptionDescription copied from interface:Heartbeat.ScheduledHeartbeatGenerates a heartbeat record if defined time has elapsed- Specified by:
emitWithDelayin interfaceHeartbeat.ScheduledHeartbeat- Parameters:
partition- partition for the heartbeat recordoffset- offset for the heartbeat record- Throws:
InterruptedException
-
emit
Description copied from interface:HeartbeatGenerates a heartbeat record unconditionally- Specified by:
emitin interfaceHeartbeat- Parameters:
partition- partition for the heartbeat recordoffset- offset for the heartbeat record- Throws:
InterruptedException
-
isEnabled
public boolean isEnabled()Description copied from interface:HeartbeatWhether heartbeats are enabled or not. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceHeartbeat
-