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:
java.io.Closeable
,java.lang.AutoCloseable
,java.util.Iterator<JournalEntry>
public final class JournalReader extends org.apache.jackrabbit.guava.common.collect.AbstractIterator<JournalEntry> implements java.io.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
-
-
-
-
Constructor Detail
-
JournalReader
public JournalReader(JournalFile journal) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
computeNext
protected JournalEntry computeNext()
- Specified by:
computeNext
in classorg.apache.jackrabbit.guava.common.collect.AbstractIterator<JournalEntry>
- Throws:
java.lang.IllegalStateException
- if anIOException
occurs while reading from the journal file.
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-