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 voidclose()Close this cursor, releasing its resources.booleanhasNext()Return a flag indicating whether there are next records.RecordnextRecord()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:
hasNextin interfaceRecordIterator- Returns:
trueif there are more records;falseotherwise
-
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:
nextRecordin 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:
closein interfaceRecordIterator
-
-