Class BlockingQueueFrameChannel

java.lang.Object
org.apache.druid.frame.channel.BlockingQueueFrameChannel

public class BlockingQueueFrameChannel extends Object
In-memory channel backed by a limited-capacity Deque. Instances of this class provide a ReadableFrameChannel through readable(), and a WritableFrameChannel through writable(). Instances of this class are used by a single writer and single reader. The writer and reader may run concurrently.
  • Constructor Details

    • BlockingQueueFrameChannel

      public BlockingQueueFrameChannel(int maxQueuedFrames)
      Create a channel with a particular buffer size (expressed in number of frames).
  • Method Details

    • writable

      public WritableFrameChannel writable()
      Returns the writable side of this channel.
    • readable

      public ReadableFrameChannel readable()
      Returns the readable side of this channel.
    • minimal

      public static BlockingQueueFrameChannel minimal()
      Create a channel that buffers one frame. This is the smallest possible queue size.