Class BufferedPublisher<V>

java.lang.Object
io.debezium.connector.spanner.kafka.internal.BufferedPublisher<V>

public class BufferedPublisher<V> extends Object
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 Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • thread

      private volatile Thread thread
    • value

      private final AtomicReference<V> value
    • publishImmediately

      private final Predicate<V> publishImmediately
    • onPublish

      private final Consumer<V> onPublish
    • taskUid

      private final String taskUid
    • sleepInterval

      private final Duration sleepInterval
    • clock

      private final io.debezium.util.Clock clock
    • taskSyncContextHolder

      private final TaskSyncContextHolder taskSyncContextHolder
  • Constructor Details

  • Method Details

    • buffer

      public void buffer(V update)
    • publishBuffered

      private void publishBuffered()
    • start

      public void start()
    • close

      public void close()