Class JournalReader
- java.lang.Object
-
- org.apache.jackrabbit.guava.common.collect.UnmodifiableIterator<T>
-
- org.apache.jackrabbit.guava.common.collect.AbstractIterator<JournalEntry>
-
- org.apache.jackrabbit.oak.segment.file.JournalReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterator<JournalEntry>
public final class JournalReader extends org.apache.jackrabbit.guava.common.collect.AbstractIterator<JournalEntry> implements Closeable
Iterator over the revisions in the journal in reverse order (end of the file to beginning).
-
-
Constructor Summary
Constructors Constructor Description JournalReader(JournalFile journal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected JournalEntry
computeNext()
-
Methods inherited from class org.apache.jackrabbit.guava.common.collect.AbstractIterator
endOfData, hasNext, next, peek
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
JournalReader
public JournalReader(JournalFile journal) throws IOException
- Throws:
IOException
-
-
Method Detail
-
computeNext
protected JournalEntry computeNext()
- Specified by:
computeNext
in classorg.apache.jackrabbit.guava.common.collect.AbstractIterator<JournalEntry>
- Throws:
IllegalStateException
- if anIOException
occurs while reading from the journal file.
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-