Package org.apache.druid.frame.processor
Class FileOutputChannelFactory
java.lang.Object
org.apache.druid.frame.processor.FileOutputChannelFactory
- All Implemented Interfaces:
OutputChannelFactory
-
Constructor Summary
ConstructorsConstructorDescriptionFileOutputChannelFactory(File fileChannelsDirectory, int frameSize, ByteTracker byteTracker, WireTransferableContext wireTransferableContext) -
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.
-
Constructor Details
-
FileOutputChannelFactory
public FileOutputChannelFactory(File fileChannelsDirectory, int frameSize, @Nullable ByteTracker byteTracker, WireTransferableContext wireTransferableContext)
-
-
Method Details
-
openChannel
Description copied from interface:OutputChannelFactoryCreate a channel pair tagged with a particular partition number.- Specified by:
openChannelin interfaceOutputChannelFactory- Throws:
IOException
-
openPartitionedChannel
public PartitionedOutputChannel openPartitionedChannel(String name, boolean deleteAfterRead) throws IOException Description copied from interface:OutputChannelFactoryCreate a channel pair tagged with a particular name and a flag to delete the channel data after its read.- Specified by:
openPartitionedChannelin interfaceOutputChannelFactory- Throws:
IOException
-
openNilChannel
Description copied from interface:OutputChannelFactoryCreate 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:
openNilChannelin interfaceOutputChannelFactory
-
isBuffered
public boolean isBuffered()Description copied from interface:OutputChannelFactoryWhether 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.- Specified by:
isBufferedin interfaceOutputChannelFactory
-