org.apache.jackrabbit.core.journal
Class MemoryJournal.MemoryRecordIterator

java.lang.Object
  extended by org.apache.jackrabbit.core.journal.MemoryJournal.MemoryRecordIterator
All Implemented Interfaces:
RecordIterator
Enclosing class:
MemoryJournal

public class MemoryJournal.MemoryRecordIterator
extends Object
implements RecordIterator

Record iterator implementation.


Constructor Summary
MemoryJournal.MemoryRecordIterator(long startRevision, long stopRevision)
          Create a new instance of this class.
 
Method Summary
 void close()
          Close this iterator.
 boolean hasNext()
          Return a flag indicating whether there are more records.
 Record nextRecord()
          Return the next record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryJournal.MemoryRecordIterator

public MemoryJournal.MemoryRecordIterator(long startRevision,
                                          long stopRevision)
Create a new instance of this class.

Parameters:
startRevision - start revision
stopRevision - stop revision
Method Detail

hasNext

public boolean hasNext()
Return a flag indicating whether there are more records.

Specified by:
hasNext in interface RecordIterator
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 recors, throws a NoSuchElementException. If an error occurs, throws a JournalException.

Specified by:
nextRecord in interface RecordIterator
Returns:
next record
Throws:
NoSuchElementException - if there are no more records
JournalException - if another error occurs

close

public void close()
Close this iterator. Releases all associated resources.

Specified by:
close in interface RecordIterator


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.