Interface ChangeRecordReader

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
LDIFChangeRecordReader

public interface ChangeRecordReader extends Closeable
An interface for reading change records from a data source, typically an LDIF file.

Implementations must specify the following:

  • Whether it is possible for the implementation to encounter malformed change records and, if it is possible, how they are handled.
  • Any synchronization limitations.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this change record reader if it not already closed.
    boolean
    Returns true if this reader contains another change record, blocking if necessary until either the next change record is available or the end of the stream is reached.
    Reads the next change record, blocking if necessary until a change record is available.
  • Method Details

    • close

      void close() throws IOException
      Closes this change record reader if it not already closed. Note that this method does not need to be called if a previous call of readChangeRecord() has returned null.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - If an unexpected IO error occurred while closing.
    • hasNext

      boolean hasNext() throws IOException
      Returns true if this reader contains another change record, blocking if necessary until either the next change record is available or the end of the stream is reached.
      Returns:
      true if this reader contains another change record.
      Throws:
      IOException - If an unexpected IO error occurred.
    • readChangeRecord

      Reads the next change record, blocking if necessary until a change record is available. If the next change record does not contain a change type then it will be treated as an Add change record.
      Returns:
      The next change record.
      Throws:
      IOException - If an unexpected IO error occurred while reading the change record.
      NoSuchElementException - If this reader does not contain any more change records.