Package org.apache.druid.frame.processor
Interface OutputChannelFactory
- All Known Implementing Classes:
BlockingQueueOutputChannelFactory,ComposingOutputChannelFactory,FileOutputChannelFactory
public interface OutputChannelFactory
Factory for generating channel pairs for output data from processors.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this factory creates buffered channels.openChannel(int partitionNumber) Create a channel pair tagged with a particular partition number.openNilChannel(int partitionNumber) Create a non-writable, always-empty channel pair tagged with a particular partition number.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.
-
Method Details
-
openChannel
Create a channel pair tagged with a particular partition number.- Throws:
IOException
-
openPartitionedChannel
PartitionedOutputChannel openPartitionedChannel(String name, boolean deleteAfterRead) throws IOException Create a channel pair tagged with a particular name and a flag to delete the channel data after its read.- Throws:
IOException
-
openNilChannel
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. -
isBuffered
boolean isBuffered()Whether this factory creates buffered channels. Buffered channel readers (fromOutputChannel.getReadableChannel()) will not work properly until the writer is closed. Unbuffered readers work immediately, even while the writer is open.
-