T - The type of Records as defined in the respective RandomReaderpublic class RandomReaderIterator<T extends Record> extends Object implements ListIterator<T>
Records accessible through a
RandomReader instance| Modifier | Constructor and Description |
|---|---|
protected |
RandomReaderIterator(RandomReader<T> reader)
Creates a new instance that will iterate over the
Records that are accessible through the provided
RandomReader. |
protected RandomReaderIterator(RandomReader<T> reader)
Records that are accessible through the provided
RandomReader. If some records have been consumed through the RandomReader provided, then they
will not be served again from the iterator unless it is rewindreader - the RandomReader to use to access the Recordspublic boolean hasNext()
If the status of the reader indicates that there may be more Records available but have not yet reached the
current reader through the respective mirroring procedure, then the ForwardReader.waitAvailable(long, java.util.concurrent.TimeUnit)
is used with the timeout values defined by RandomReader.getIteratorTimeout() and RandomReader.getIteratorTimeUnit()
hasNext in interface Iterator<T extends Record>hasNext in interface ListIterator<T extends Record>Iterator.hasNext()public T next()
the RandomReader.get(long, java.util.concurrent.TimeUnit) method is used to retrieve the next available
Record. The timeout values used are the ones defined by RandomReader.getIteratorTimeout() and
RandomReader.getIteratorTimeUnit(). in case there is some error during the Record retrieval or
the timeout expired, null is returned
next in interface Iterator<T extends Record>next in interface ListIterator<T extends Record>Iterator.next()public boolean hasPrevious()
If the status of the reader indicates that there are previous Records true is returned. Otherwise false
hasPrevious in interface ListIterator<T extends Record>Iterator.hasNext()public T previous()
The RandomReader.seek(long) method is used to move back the necessary number of records so that the next call to
RandomReader.get() will return the previous record. If some error occurs during the record retrieval, null is returned
previous in interface ListIterator<T extends Record>ListIterator.previous()public int nextIndex()
Operation is not supported. An IllegalStateException is thrown upon invocation
nextIndex in interface ListIterator<T extends Record>ListIterator.nextIndex()public int previousIndex()
Operation is not supported. An IllegalStateException is thrown upon invocation
previousIndex in interface ListIterator<T extends Record>ListIterator.previousIndex()public void remove()
Operation is not supported. An IllegalStateException is thrown upon invocation
remove in interface Iterator<T extends Record>remove in interface ListIterator<T extends Record>ListIterator.remove()public void set(T o)
Operation is not supported. An IllegalStateException is thrown upon invocation
set in interface ListIterator<T extends Record>ListIterator.set(java.lang.Object)public void add(T o)
Operation is not supported. An IllegalStateException is thrown upon invocation
add in interface ListIterator<T extends Record>ListIterator.add(java.lang.Object)Copyright © 2014. All Rights Reserved.