Package org.apache.jackrabbit.rmi.remote
Class ArrayIterator
- java.lang.Object
-
- org.apache.jackrabbit.rmi.remote.ArrayIterator
-
- All Implemented Interfaces:
Serializable,Remote,RemoteIterator
@Deprecated public class ArrayIterator extends Object implements RemoteIterator, Serializable
Deprecated.RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.A simple array-based remote iterator. Used when the iteration is short enough for all the elements to be sent over the network in one go.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArrayIterator(Object[] elements)Deprecated.Creates an array-based remote iterator from the given array of remote references or serializable objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longgetSize()Deprecated.Returns the size of the iterator.Object[]nextObjects()Deprecated.Returns the underlying array.voidskip(long items)Deprecated.Skips the firstitemselements in the array.
-
-
-
Constructor Detail
-
ArrayIterator
public ArrayIterator(Object[] elements)
Deprecated.Creates an array-based remote iterator from the given array of remote references or serializable objects.- Parameters:
elements- elements of the iteration
-
-
Method Detail
-
getSize
public long getSize()
Deprecated.Returns the size of the iterator.- Specified by:
getSizein interfaceRemoteIterator- Returns:
- length of the iterator
- See Also:
RemoteIterator.getSize()
-
skip
public void skip(long items) throws IllegalArgumentException, NoSuchElementExceptionDeprecated.Skips the firstitemselements in the array. Skips the given number of elements in this iteration.- Specified by:
skipin interfaceRemoteIterator- Parameters:
items- number of elements to skip- Throws:
NoSuchElementException- if skipped past the last elementIllegalArgumentException- See Also:
RangeIterator.skip(long)
-
nextObjects
public Object[] nextObjects() throws IllegalArgumentException
Deprecated.Returns the underlying array. Returns an array of remote references to the next elements in this iterator. Returnsnullif the end of this iteration has been reached.To reduce the amount of remote method calls, this method returns an array of one or more elements in this iteration.
- Specified by:
nextObjectsin interfaceRemoteIterator- Returns:
- array of remote references, or
null - Throws:
IllegalArgumentException- ifmaxItemsis not positive- See Also:
Iterator.next()
-
-