A buffered remote iterator. Used to transfer a remote iterator reference along with a buffer of the first few iterator elements in one network transmission.
@Deprecated public class BufferIterator extends Object implements RemoteIterator, Serializable
Constructor and Description |
---|
BufferIterator(Object[] buffer,
long size,
RemoteIterator remote)
Deprecated.
Creates a new buffered remote iterator.
|
Modifier and Type | Method and Description |
---|---|
long |
getSize()
Deprecated.
Returns the cached size of the iterator.
|
Object[] |
nextObjects()
Deprecated.
Returns the currently buffered elements and fills in the buffer
with next elements.
|
void |
skip(long items)
Deprecated.
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 RemoteIterator
items
- 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 RemoteIterator
null
if the iterator has endedRemoteException
- on RMI errorsRemoteIterator.nextObjects()
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.