Package org.apache.druid.frame.processor
Class ComposingOutputChannelFactory
- java.lang.Object
-
- org.apache.druid.frame.processor.ComposingOutputChannelFactory
-
- All Implemented Interfaces:
OutputChannelFactory
public class ComposingOutputChannelFactory extends Object implements OutputChannelFactory
A channel factory which provides ordered composed channels. The factory encapsulates multiple output channel factories and automatically switches between then when the current factory is 'full' for writes. The reads can also encapsulate multiple readable channels with automatic switching.
-
-
Constructor Summary
Constructors Constructor Description ComposingOutputChannelFactory(List<OutputChannelFactory> channelFactories, int frameSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputChannel
openChannel(int partitionNumber)
Create a channel pair tagged with a particular partition number.OutputChannel
openNilChannel(int partitionNumber)
Create a non-writable, always-empty channel pair tagged with a particular partition number.PartitionedOutputChannel
openPartitionedChannel(String name, boolean deleteAfterRead)
Create a channel pair tagged with a particular name and a flag to delete the channel data after its read.
-
-
-
Constructor Detail
-
ComposingOutputChannelFactory
public ComposingOutputChannelFactory(List<OutputChannelFactory> channelFactories, int frameSize)
-
-
Method Detail
-
openChannel
public OutputChannel openChannel(int partitionNumber)
Description copied from interface:OutputChannelFactory
Create a channel pair tagged with a particular partition number.- Specified by:
openChannel
in interfaceOutputChannelFactory
-
openPartitionedChannel
public PartitionedOutputChannel openPartitionedChannel(String name, boolean deleteAfterRead)
Description copied from interface:OutputChannelFactory
Create a channel pair tagged with a particular name and a flag to delete the channel data after its read.- Specified by:
openPartitionedChannel
in interfaceOutputChannelFactory
-
openNilChannel
public OutputChannel openNilChannel(int partitionNumber)
Description copied from interface:OutputChannelFactory
Create a non-writable, always-empty channel pair tagged with a particular partition number. CallingOutputChannel.getWritableChannel()
on this nil channel pair will result in an error. CallingOutputChannel.getReadableChannel()
will return an empty channel.- Specified by:
openNilChannel
in interfaceOutputChannelFactory
-
-