Package org.apache.druid.frame.processor
Class OutputChannels
- java.lang.Object
-
- org.apache.druid.frame.processor.OutputChannels
-
public class OutputChannels extends Object
A list ofOutputChannel
. The advantage of this class overList<OutputChannel>
is that it has extra convenience methods likegetChannelsForPartition(int)
andreadOnly()
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areReadableChannelsReady()
List<OutputChannel>
getAllChannels()
Returns all channels.List<ReadableFrameChannel>
getAllReadableChannels()
Returns all channels, as readable channels.List<OutputChannel>
getChannelsForPartition(int partitionNumber)
Returns channels for whichOutputChannel.getPartitionNumber()
returnspartitionNumber
.it.unimi.dsi.fastutil.ints.IntSortedSet
getPartitionNumbers()
Returns the set of partition numbers that appear across all channels.static OutputChannels
none()
OutputChannels
readOnly()
Returns a read-only version of this instance.static OutputChannels
wrap(List<OutputChannel> outputChannels)
Creates an instance wrapping all the provided channels.static OutputChannels
wrapReadOnly(List<OutputChannel> outputChannels)
Creates an instance wrapping read-only versions (seeOutputChannel.readOnly()
) of all the provided channels.
-
-
-
Method Detail
-
none
public static OutputChannels none()
-
wrap
public static OutputChannels wrap(List<OutputChannel> outputChannels)
Creates an instance wrapping all the provided channels.
-
wrapReadOnly
public static OutputChannels wrapReadOnly(List<OutputChannel> outputChannels)
Creates an instance wrapping read-only versions (seeOutputChannel.readOnly()
) of all the provided channels.
-
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 whichOutputChannel.getPartitionNumber()
returnspartitionNumber
.
-
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.
-
areReadableChannelsReady
public boolean areReadableChannelsReady()
-
-