Interface Writer<T>

Type Parameters:
T - the written object type
All Known Subinterfaces:
InMemoryStream<T>, Stream<T>
All Known Implementing Classes:
ArrayBlockingStream, LinkedBlockingStream, QueueStream

public interface Writer<T>
Writer contract for single objects or iterator-backed batches.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(Iterator<T> objects)
    Writes all objects provided by the iterator.
    void
    write(T object)
    Writes a single object.
  • Method Details

    • write

      void write(T object) throws IOException
      Writes a single object.
      Parameters:
      object - the object to write
      Throws:
      IOException - if the write fails
    • write

      void write(Iterator<T> objects) throws IOException
      Writes all objects provided by the iterator.
      Parameters:
      objects - the objects to write
      Throws:
      IOException - if the write fails