Package org.apache.druid.frame.channel
Class WritableFrameFileChannel
java.lang.Object
org.apache.druid.frame.channel.WritableFrameFileChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,WritableFrameChannel
Frame channel backed by a
FrameFileWriter.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Finish writing to this channel.voidCalled prior toWritableFrameChannel.close()if the writer has failed.booleanisClosed()WhetherWritableFrameChannel.close()has been called on this channel.com.google.common.util.concurrent.ListenableFuture<?> Returns a future that resolves whenWritableFrameChannel.write(org.apache.druid.frame.channel.FrameWithPartition)is able to receive a new frame without blocking or throwing an exception.voidwrite(FrameWithPartition frame) Writes a frame with an attached partition number.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.frame.channel.WritableFrameChannel
write
-
Constructor Details
-
WritableFrameFileChannel
-
-
Method Details
-
write
Description copied from interface:WritableFrameChannelWrites a frame with an attached partition number. May throw an exception ifWritableFrameChannel.writabilityFuture()is unresolved.- Specified by:
writein interfaceWritableFrameChannel- Throws:
IOException
-
fail
Description copied from interface:WritableFrameChannelCalled prior toWritableFrameChannel.close()if the writer has failed. Must be followed by a call toWritableFrameChannel.close().- Specified by:
failin interfaceWritableFrameChannel- Parameters:
cause- optional cause of failure. Used by the in-memory channelto propagate exeptions to downstream processors. Most other channels ignore the provided cause.invalid reference
BlockingQueueFrameChannel.Writable- Throws:
IOException
-
close
Description copied from interface:WritableFrameChannelFinish writing to this channel. When this method is called withoutWritableFrameChannel.fail(Throwable)having previously been called, the writer is understood to have completed successfully. After calling this method, no additional calls toWritableFrameChannel.write(org.apache.druid.frame.channel.FrameWithPartition),WritableFrameChannel.fail(Throwable), or this method are permitted.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceWritableFrameChannel- Throws:
IOException
-
isClosed
public boolean isClosed()Description copied from interface:WritableFrameChannelWhetherWritableFrameChannel.close()has been called on this channel.- Specified by:
isClosedin interfaceWritableFrameChannel
-
writabilityFuture
public com.google.common.util.concurrent.ListenableFuture<?> writabilityFuture()Description copied from interface:WritableFrameChannelReturns a future that resolves whenWritableFrameChannel.write(org.apache.druid.frame.channel.FrameWithPartition)is able to receive a new frame without blocking or throwing an exception. The future never resolves to an exception.- Specified by:
writabilityFuturein interfaceWritableFrameChannel
-