Package io.debezium.pipeline.signal
Class Signal<P extends Partition>
- java.lang.Object
-
- io.debezium.pipeline.signal.Signal<P>
-
@NotThreadSafe public class Signal<P extends Partition> extends Object
The class responsible for processing of signals delivered to Debezium via a dedicated signaling table. The processor supports a common set of signals that it can process and every connector can register its own additional signals. The signalling table must conform to the structureid STRING
- the unique identifier of the signal sent, usually UUID, can be used for deduplicationtype STRING
- the unique logical name of the code executing the signaldata STRING
- the data in JSON format that are passed to the signal code
- Author:
- Jiri Pechanec
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Signal.Action<P extends Partition>
static class
Signal.Payload<P extends Partition>
-
Field Summary
Fields Modifier and Type Field Description private CommonConnectorConfig
connectorConfig
private static org.slf4j.Logger
LOGGER
private Map<String,Signal.Action<P>>
signalActions
-
Constructor Summary
Constructors Constructor Description Signal(CommonConnectorConfig connectorConfig)
Signal(CommonConnectorConfig connectorConfig, EventDispatcher<P,? extends DataCollectionId> eventDispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSignal(DataCollectionId dataCollectionId)
boolean
process(P partition, String id, String type, String data)
boolean
process(P partition, String id, String type, String data, OffsetContext offset, org.apache.kafka.connect.data.Struct source)
boolean
process(P partition, org.apache.kafka.connect.data.Struct value, OffsetContext offset)
void
registerSignalAction(String id, Signal.Action<P> signal)
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
connectorConfig
private final CommonConnectorConfig connectorConfig
-
signalActions
private final Map<String,Signal.Action<P extends Partition>> signalActions
-
-
Constructor Detail
-
Signal
public Signal(CommonConnectorConfig connectorConfig, EventDispatcher<P,? extends DataCollectionId> eventDispatcher)
-
Signal
Signal(CommonConnectorConfig connectorConfig)
-
-
Method Detail
-
isSignal
public boolean isSignal(DataCollectionId dataCollectionId)
-
registerSignalAction
public void registerSignalAction(String id, Signal.Action<P> signal)
-
process
public boolean process(P partition, String id, String type, String data, OffsetContext offset, org.apache.kafka.connect.data.Struct source) throws InterruptedException
- Throws:
InterruptedException
-
process
public boolean process(P partition, String id, String type, String data) throws InterruptedException
- Throws:
InterruptedException
-
process
public boolean process(P partition, org.apache.kafka.connect.data.Struct value, OffsetContext offset) throws InterruptedException
- Parameters:
value
- Envelope with change from signaling tableoffset
- offset of the incoming signal- Returns:
- true if the signal was processed
- Throws:
InterruptedException
-
-