Package org.apache.jackrabbit.rmi.remote
Class BufferIterator
- java.lang.Object
-
- org.apache.jackrabbit.rmi.remote.BufferIterator
-
- All Implemented Interfaces:
Serializable
,Remote
,RemoteIterator
@Deprecated(forRemoval=true) public class BufferIterator extends Object implements RemoteIterator, Serializable
Deprecated, for removal: This API element is subject to removal in a future version.RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BufferIterator(Object[] buffer, long size, RemoteIterator remote)
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new buffered remote iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getSize()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the cached size of the iterator.Object[]
nextObjects()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the currently buffered elements and fills in the buffer with next elements.void
skip(long items)
Deprecated, for removal: This API element is subject to removal in a future version.Skips the given number of elements.
-
-
-
Constructor Detail
-
BufferIterator
public BufferIterator(Object[] buffer, long size, RemoteIterator remote)
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new buffered remote iterator.- Parameters:
buffer
- first elements in the iteratorsize
- total iterator sizeremote
- reference to the remaining iterator
-
-
Method Detail
-
getSize
public long getSize()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the cached size of the iterator.- Specified by:
getSize
in interfaceRemoteIterator
- Returns:
- iterator size, or
-1
if unknown - See Also:
RemoteIterator.getSize()
-
skip
public void skip(long items) throws IllegalArgumentException, NoSuchElementException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Skips the given number of elements. First discards elements from the element buffer and only then contacts the remote iterator.- Specified by:
skip
in interfaceRemoteIterator
- Parameters:
items
- number of items to skip- Throws:
IllegalArgumentException
- ifitems
is negativeNoSuchElementException
- if skipped past the last elementRemoteException
- on RMI errors- See Also:
RemoteIterator.skip(long)
-
nextObjects
public Object[] nextObjects() throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Returns the currently buffered elements and fills in the buffer with next elements.- Specified by:
nextObjects
in interfaceRemoteIterator
- Returns:
- buffered elements, or
null
if the iterator has ended - Throws:
RemoteException
- on RMI errors- See Also:
RemoteIterator.nextObjects()
-
-