Class SynchronizedPartitionManager
java.lang.Object
io.debezium.connector.spanner.task.SynchronizedPartitionManager
- All Implemented Interfaces:
PartitionManager
This class produces events depending on the type of record received from the change
stream (i.e. data change, heartbeat, child partitions record), and sends them to
TaskStateChangeEventHandler.
This class sends the following events to TaskStateChangeEventHandler: (1) Sharing / owning new
child partition tokens (2) setting the last commit timestamp for a partition (3) updating
the change stream partition state to RUNNING / FINISHED
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.debezium.function.BlockingConsumer<TaskStateChangeEvent> -
Constructor Summary
ConstructorsConstructorDescriptionSynchronizedPartitionManager(io.debezium.function.BlockingConsumer<TaskStateChangeEvent> syncEventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionvoidnewChildPartitions(List<Partition> partitions) voidupdateToFinished(String token) voidupdateToReadyForStreaming(String token) voidupdateToRunning(String token)
-
Field Details
-
syncEventPublisher
-
-
Constructor Details
-
SynchronizedPartitionManager
public SynchronizedPartitionManager(io.debezium.function.BlockingConsumer<TaskStateChangeEvent> syncEventPublisher)
-
-
Method Details
-
newChildPartitions
- Specified by:
newChildPartitionsin interfacePartitionManager- Throws:
InterruptedException
-
updateToFinished
- Specified by:
updateToFinishedin interfacePartitionManager- Throws:
InterruptedException
-
updateToRunning
- Specified by:
updateToRunningin interfacePartitionManager- Throws:
InterruptedException
-
updateToReadyForStreaming
- Specified by:
updateToReadyForStreamingin interfacePartitionManager- Throws:
InterruptedException
-