Class BufferedPublisher<V>
java.lang.Object
io.debezium.connector.spanner.kafka.internal.BufferedPublisher<V>
This class allows to publish the latest buffered value
once per time period, except the case: if the value is required
to be published immediately.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.debezium.util.Clockprivate static final org.slf4j.Loggerprivate final Durationprivate final TaskSyncContextHolderprivate final Stringprivate Threadprivate final AtomicReference<V> -
Constructor Summary
ConstructorsConstructorDescriptionBufferedPublisher(String taskUid, String name, TaskSyncContextHolder taskSyncContextHolder, long timeout, Predicate<V> publishImmediately, Consumer<V> onPublish) -
Method Summary
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
thread
-
value
-
publishImmediately
-
onPublish
-
taskUid
-
sleepInterval
-
clock
private final io.debezium.util.Clock clock -
taskSyncContextHolder
-
-
Constructor Details
-
BufferedPublisher
-
-
Method Details
-
buffer
-
publishBuffered
private void publishBuffered() -
start
public void start() -
close
public void close()
-