Package org.apache.druid.frame.processor
Class OutputChannels
java.lang.Object
org.apache.druid.frame.processor.OutputChannels
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 Summary
Modifier and TypeMethodDescriptionReturns all channels.Returns all channels, as readable channels.getChannelsForPartition(int partitionNumber) Returns channels for whichOutputChannel.getPartitionNumber()returnspartitionNumber.it.unimi.dsi.fastutil.ints.IntSortedSetReturns the set of partition numbers that appear across all channels.booleanReturns whether this instance is read-only (all channels haveOutputChannel.isReadOnly()).static OutputChannelsnone()readOnly()Returns a read-only version of this instance.Verifies there is exactly one channel per partition.static OutputChannelswrap(List<OutputChannel> outputChannels) Creates an instance wrapping all the provided channels.
-
Method Details
-
none
-
wrap
Creates an instance wrapping all the provided channels. -
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
Returns all channels. -
getAllReadableChannels
Returns all channels, as readable channels. -
getChannelsForPartition
Returns channels for whichOutputChannel.getPartitionNumber()returnspartitionNumber. -
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 haveOutputChannel.isReadOnly()).
-