Class ThriftIO.Sink<T extends org.apache.thrift.TBase<?,?>>

java.lang.Object
org.apache.beam.sdk.io.thrift.ThriftIO.Sink<T>
All Implemented Interfaces:
Serializable, FileIO.Sink<T>
Enclosing class:
ThriftIO

public abstract static class ThriftIO.Sink<T extends org.apache.thrift.TBase<?,?>> extends Object implements FileIO.Sink<T>
See Also:
  • Constructor Details

    • Sink

      public Sink()
  • Method Details

    • open

      public void open(WritableByteChannel channel) throws IOException
      Description copied from interface: FileIO.Sink
      Initializes writing to the given channel. Will be invoked once on a given FileIO.Sink instance.
      Specified by:
      open in interface FileIO.Sink<T extends org.apache.thrift.TBase<?,?>>
      Throws:
      IOException
    • write

      public void write(T element) throws IOException
      Description copied from interface: FileIO.Sink
      Appends a single element to the file. May be invoked zero or more times.
      Specified by:
      write in interface FileIO.Sink<T extends org.apache.thrift.TBase<?,?>>
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Description copied from interface: FileIO.Sink
      Flushes the buffered state (if any) before the channel is closed. Does not need to close the channel. Will be invoked once.
      Specified by:
      flush in interface FileIO.Sink<T extends org.apache.thrift.TBase<?,?>>
      Throws:
      IOException