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 Type
    Method
    Description
    boolean
    Whether 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

      OutputChannel openChannel(int partitionNumber) throws IOException
      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

      OutputChannel openNilChannel(int partitionNumber)
      Create a non-writable, always-empty channel pair tagged with a particular partition number. Calling OutputChannel.getWritableChannel() on this nil channel pair will result in an error. Calling OutputChannel.getReadableChannel() will return an empty channel.
    • isBuffered

      boolean isBuffered()
      Whether this factory creates buffered channels. Buffered channel readers (from OutputChannel.getReadableChannel()) will not work properly until the writer is closed. Unbuffered readers work immediately, even while the writer is open.