Class FileRecordIterator
- java.lang.Object
-
- org.apache.jackrabbit.core.journal.FileRecordIterator
-
- All Implemented Interfaces:
RecordIterator
public class FileRecordIterator extends Object implements RecordIterator
Record cursor that returns unseen revisions in ascending order on every iteration.
-
-
Constructor Summary
Constructors Constructor Description FileRecordIterator(File[] logFiles, long startRevision, long stopRevision, NamespaceResolver resolver, NamePathResolver npResolver)
Creates a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this cursor, releasing its resources.boolean
hasNext()
Return a flag indicating whether there are next records.Record
nextRecord()
Return the next record.
-
-
-
Constructor Detail
-
FileRecordIterator
public FileRecordIterator(File[] logFiles, long startRevision, long stopRevision, NamespaceResolver resolver, NamePathResolver npResolver)
Creates a new instance of this class.- Parameters:
logFiles
- available log files, sorted ascending by agestartRevision
- start point (exclusive)stopRevision
- stop point (inclusive)
-
-
Method Detail
-
hasNext
public boolean hasNext()
Return a flag indicating whether there are next records.- Specified by:
hasNext
in interfaceRecordIterator
- Returns:
true
if there are more records;false
otherwise
-
nextRecord
public Record nextRecord() throws NoSuchElementException, JournalException
Return the next record. If there are no more records, throws aNoSuchElementException
. If an error occurs, throws aJournalException
.- Specified by:
nextRecord
in interfaceRecordIterator
- Returns:
- next record
- Throws:
NoSuchElementException
- if there are no more recordsJournalException
- if another error occurs
-
close
public void close()
Close this cursor, releasing its resources.- Specified by:
close
in interfaceRecordIterator
-
-