@NotThreadSafe public class Signal extends Object
id 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
| Modifier and Type | Class and Description |
|---|---|
static interface |
Signal.Action |
static class |
Signal.Payload |
| Modifier and Type | Field and Description |
|---|---|
private CommonConnectorConfig |
connectorConfig |
private EventDispatcher<? extends DataCollectionId> |
dispatcher |
private static org.slf4j.Logger |
LOGGER |
private Map<String,Signal.Action> |
signalActions |
private String |
signalDataCollectionId |
| Constructor and Description |
|---|
Signal(CommonConnectorConfig connectorConfig) |
Signal(CommonConnectorConfig connectorConfig,
EventDispatcher<? extends DataCollectionId> eventDispatcher) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isSignal(DataCollectionId dataCollectionId) |
boolean |
process(String id,
String type,
String data) |
boolean |
process(String id,
String type,
String data,
OffsetContext offset,
org.apache.kafka.connect.data.Struct source) |
boolean |
process(org.apache.kafka.connect.data.Struct value,
OffsetContext offset) |
void |
registerSignalAction(String id,
Signal.Action signal) |
private static final org.slf4j.Logger LOGGER
private final CommonConnectorConfig connectorConfig
private final String signalDataCollectionId
private final EventDispatcher<? extends DataCollectionId> dispatcher
private final Map<String,Signal.Action> signalActions
public Signal(CommonConnectorConfig connectorConfig, EventDispatcher<? extends DataCollectionId> eventDispatcher)
Signal(CommonConnectorConfig connectorConfig)
public boolean isSignal(DataCollectionId dataCollectionId)
public void registerSignalAction(String id, Signal.Action signal)
public boolean process(String id, String type, String data, OffsetContext offset, org.apache.kafka.connect.data.Struct source) throws InterruptedException
InterruptedExceptionpublic boolean process(String id, String type, String data) throws InterruptedException
InterruptedExceptionpublic boolean process(org.apache.kafka.connect.data.Struct value,
OffsetContext offset)
throws InterruptedException
value - Envelope with change from signaling tableoffset - offset of the incoming signalInterruptedExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.