public class BufferIterator extends Object implements RemoteIterator, Serializable
| Constructor and Description |
|---|
BufferIterator(Object[] buffer,
long size,
RemoteIterator remote)
Creates a new buffered remote iterator.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getSize()
Returns the cached size of the iterator.
|
Object[] |
nextObjects()
Returns the currently buffered elements and fills in the buffer
with next elements.
|
void |
skip(long items)
Skips the given number of elements.
|
public BufferIterator(Object[] buffer, long size, RemoteIterator remote)
buffer - first elements in the iteratorsize - total iterator sizeremote - reference to the remaining iteratorpublic long getSize()
getSize in interface RemoteIterator-1 if unknownRemoteIterator.getSize()public void skip(long items)
throws IllegalArgumentException,
NoSuchElementException,
RemoteException
skip in interface RemoteIteratoritems - number of items to skipIllegalArgumentException - if items is negativeNoSuchElementException - if skipped past the last elementRemoteException - on RMI errorsRemoteIterator.skip(long)public Object[] nextObjects() throws RemoteException
nextObjects in interface RemoteIteratornull if the iterator has endedRemoteException - on RMI errorsRemoteIterator.nextObjects()Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.