Class InProcessSignalChannel
java.lang.Object
io.debezium.pipeline.signal.channels.process.InProcessSignalChannel
- All Implemented Interfaces:
SignalChannelWriter,SignalChannelReader
@ThreadSafe
public class InProcessSignalChannel
extends Object
implements SignalChannelReader, SignalChannelWriter
Implementation of
SignalChannelReader that also implements SignalChannelWriter
used for sending signal from the same JVM process
Mainly targeted at Debezium Engine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate static final org.slf4j.Loggerprivate final AtomicBooleanprivate final Queue<SignalRecord> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the channel and drain all the signalsprivate voiddrain()voidinit(CommonConnectorConfig connectorConfig) name()read()voidsignal(SignalRecord signal) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.signal.channels.SignalChannelReader
reset
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CHANNEL_NAME
- See Also:
-
open
-
signals
-
-
Constructor Details
-
InProcessSignalChannel
public InProcessSignalChannel()
-
-
Method Details
-
name
- Specified by:
namein interfaceSignalChannelReader
-
init
- Specified by:
initin interfaceSignalChannelReader
-
read
- Specified by:
readin interfaceSignalChannelReader
-
close
public void close()Close the channel and drain all the signalsNote: To properly synchronise closing and reading a lock should be used. However this is not necessary as any concurrent call to these methods is equal to serially calling read and close (or the other way around). The connector handles both cases (and the queue is already thread safe).
- Specified by:
closein interfaceSignalChannelReader
-
drain
private void drain() -
signal
- Specified by:
signalin interfaceSignalChannelWriter
-