Interface ChangeRecordWriter

All Superinterfaces:
AutoCloseable, Closeable, Flushable
All Known Implementing Classes:
ConnectionChangeRecordWriter, LDIFChangeRecordWriter

public interface ChangeRecordWriter extends Closeable, Flushable
An interface for writing change records to a data source, typically an LDIF file.
  • Method Details

    • close

      void close() throws IOException
      Closes this change record writer, flushing it first. Closing a previously closed change record writer has no effect.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - If an unexpected IO error occurred while closing.
    • flush

      void flush() throws IOException
      Flushes this change record writer so that any buffered data is written immediately to underlying stream, flushing the stream if it is also Flushable.

      If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.

      Specified by:
      flush in interface Flushable
      Throws:
      IOException - If an unexpected IO error occurred while flushing.
    • writeChangeRecord

      Writes an Add change record.
      Parameters:
      change - The AddRequest to be written as an Add change record.
      Returns:
      A reference to this change record writer.
      Throws:
      IOException - If an unexpected IO error occurred while writing the change record.
      NullPointerException - If change was null.
    • writeChangeRecord

      Writes a change record.
      Parameters:
      change - The ChangeRecord to be written.
      Returns:
      A reference to this change record writer.
      Throws:
      IOException - If an unexpected IO error occurred while writing the change record.
      NullPointerException - If change was null.
    • writeChangeRecord

      Writes a Delete change record.
      Parameters:
      change - The DeleteRequest to be written as an Delete change record.
      Returns:
      A reference to this change record writer.
      Throws:
      IOException - If an unexpected IO error occurred while writing the change record.
      NullPointerException - If change was null.
    • writeChangeRecord

      Writes a ModifyDN change record.
      Parameters:
      change - The ModifyDNRequest to be written as an ModifyDN change record.
      Returns:
      A reference to this change record writer.
      Throws:
      IOException - If an unexpected IO error occurred while writing the change record.
      NullPointerException - If change was null.
    • writeChangeRecord

      Writes a Modify change record.
      Parameters:
      change - The ModifyRequest to be written as an Modify change record.
      Returns:
      A reference to this change record writer.
      Throws:
      IOException - If an unexpected IO error occurred while writing the change record.
      NullPointerException - If change was null.
    • writeComment

      Writes a comment.
      Parameters:
      comment - The CharSequence to be written as a comment.
      Returns:
      A reference to this change record writer.
      Throws:
      IOException - If an unexpected IO error occurred while writing the comment.
      NullPointerException - If comment was null.