public class WritableFrameFileChannel extends Object implements WritableFrameChannel
FrameFileWriter.| Constructor and Description |
|---|
WritableFrameFileChannel(FrameFileWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Finish writing to this channel.
|
void |
fail(Throwable cause)
Called prior to
WritableFrameChannel.close() if the writer has failed. |
com.google.common.util.concurrent.ListenableFuture<?> |
writabilityFuture()
Returns a future that resolves when
WritableFrameChannel.write(org.apache.druid.frame.channel.FrameWithPartition) is able to receive a new frame without blocking or throwing
an exception. |
void |
write(FrameWithPartition frame)
Writes a frame with an attached partition number.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic WritableFrameFileChannel(FrameFileWriter writer)
public void write(FrameWithPartition frame) throws IOException
WritableFrameChannelWritableFrameChannel.writabilityFuture() is unresolved.write in interface WritableFrameChannelIOExceptionpublic void fail(@Nullable Throwable cause) throws IOException
WritableFrameChannelWritableFrameChannel.close() if the writer has failed. Must be followed by a call to WritableFrameChannel.close().fail in interface WritableFrameChannelcause - optional cause of failure. Used by the in-memory channel BlockingQueueFrameChannel.Writable
to propagate exeptions to downstream processors. Most other channels ignore the provided cause.IOExceptionpublic void close()
throws IOException
WritableFrameChannelWritableFrameChannel.fail(Throwable) having previously been called, the writer is
understood to have completed successfully.
After calling this method, no additional calls to WritableFrameChannel.write(org.apache.druid.frame.channel.FrameWithPartition), WritableFrameChannel.fail(Throwable), or this method
are permitted.close in interface Closeableclose in interface AutoCloseableclose in interface WritableFrameChannelIOExceptionpublic com.google.common.util.concurrent.ListenableFuture<?> writabilityFuture()
WritableFrameChannelWritableFrameChannel.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.writabilityFuture in interface WritableFrameChannelCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.