public class FileRecordIterator extends Object implements RecordIterator
Constructor and Description |
---|
FileRecordIterator(File[] logFiles,
long startRevision,
long stopRevision,
NamespaceResolver resolver,
NamePathResolver npResolver)
Creates a new instance of this class.
|
Modifier and Type | Method and 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.
|
public FileRecordIterator(File[] logFiles, long startRevision, long stopRevision, NamespaceResolver resolver, NamePathResolver npResolver)
logFiles
- available log files, sorted ascending by agestartRevision
- start point (exclusive)stopRevision
- stop point (inclusive)public boolean hasNext()
hasNext
in interface RecordIterator
true
if there are more records;
false
otherwisepublic Record nextRecord() throws NoSuchElementException, JournalException
NoSuchElementException
. If an error occurs,
throws a JournalException
.nextRecord
in interface RecordIterator
NoSuchElementException
- if there are no more recordsJournalException
- if another error occurspublic void close()
close
in interface RecordIterator
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.