Interface QueueProvider<T>

Type Parameters:
T - the type of event stored in the queue
All Superinterfaces:
AutoCloseable, io.debezium.spi.common.Configurable
All Known Implementing Classes:
DefaultQueueProvider

public interface QueueProvider<T> extends io.debezium.spi.common.Configurable, AutoCloseable
Provides queue operations for change events.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    void
    enqueue(T event)
    Adds an event to the queue.
     
    Retrieves and removes the next event from the queue.
    int
    Returns the number of events currently in the queue.

    Methods inherited from interface io.debezium.spi.common.Configurable

    configure
  • Method Details

    • name

      String name()
      Returns:
      the name of the queue provider
    • enqueue

      void enqueue(T event) throws InterruptedException
      Adds an event to the queue.
      Parameters:
      event - the event to enqueue
      Throws:
      InterruptedException - if interrupted while waiting to enqueue
    • poll

      T poll() throws InterruptedException
      Retrieves and removes the next event from the queue.
      Returns:
      the next event, or null if the queue is empty
      Throws:
      InterruptedException - if interrupted while waiting to poll
    • size

      int size()
      Returns the number of events currently in the queue.
      Returns:
      the queue size
    • close

      default void close()
      Specified by:
      close in interface AutoCloseable