Class OutputChannels

java.lang.Object
org.apache.druid.frame.processor.OutputChannels

public class OutputChannels extends Object
A list of OutputChannel. The advantage of this class over List<OutputChannel> is that it has extra convenience methods like getChannelsForPartition(int) and readOnly().
  • Method Details

    • none

      public static OutputChannels none()
    • wrap

      public static OutputChannels wrap(List<OutputChannel> outputChannels)
      Creates an instance wrapping all the provided channels.
    • verifySingleChannel

      public OutputChannels verifySingleChannel()
      Verifies there is exactly one channel per partition.
    • getPartitionNumbers

      public it.unimi.dsi.fastutil.ints.IntSortedSet getPartitionNumbers()
      Returns the set of partition numbers that appear across all channels.
    • getAllChannels

      public List<OutputChannel> getAllChannels()
      Returns all channels.
    • getAllReadableChannels

      public List<ReadableFrameChannel> getAllReadableChannels()
      Returns all channels, as readable channels.
    • getChannelsForPartition

      public List<OutputChannel> getChannelsForPartition(int partitionNumber)
      Returns channels for which OutputChannel.getPartitionNumber() returns partitionNumber.
    • readOnly

      public OutputChannels readOnly()
      Returns a read-only version of this instance. Each individual output channel is replaced with its read-only version (OutputChannel.readOnly(), which reduces memory usage.
    • isReadOnly

      public boolean isReadOnly()
      Returns whether this instance is read-only (all channels have OutputChannel.isReadOnly()).