T - The type of Records as defined in the respective ForwardReaderpublic class ForwardReaderIterator<T extends Record> extends Object implements Iterator<T>
Records accessible through a
ForwardReader instance| Modifier | Constructor and Description |
|---|---|
protected |
ForwardReaderIterator(ForwardReader<T> reader)
Creates a new instance that will iterate over the
Records that are accessible through the provided
ForwardReader. |
protected ForwardReaderIterator(ForwardReader<T> reader)
Records that are accessible through the provided
ForwardReader. If some records have been consumed through the ForwardReader provided, then they
will not be served again from the iteratorreader - the ForwardReader 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 ForwardReader.getIteratorTimeout() and ForwardReader.getIteratorTimeUnit()
hasNext in interface Iterator<T extends Record>Iterator.hasNext()public T next()
the ForwardReader.get(long, java.util.concurrent.TimeUnit) method is used to retrieve the next available
Record. The timeout values used are the ones defined by ForwardReader.getIteratorTimeout() and
ForwardReader.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>GRS2UncheckedException - if exception is written in the RS by the writer when the reader reads it it throws is up as
an unchecked GRS2UncheckedException exception. The reason that this exception is unchecked is to follow the java.util.Iterator
interfaceIterator.next()public void remove()
Operation is not supported. An IllegalStateException is thrown upon invocation
remove in interface Iterator<T extends Record>Iterator.remove()Copyright © 2014. All Rights Reserved.