Package org.apache.jackrabbit.rmi.remote
Class ArrayIterator
- java.lang.Object
-
- org.apache.jackrabbit.rmi.remote.ArrayIterator
-
- All Implemented Interfaces:
Serializable
,Remote
,RemoteIterator
@Deprecated(forRemoval=true) public class ArrayIterator 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 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, for removal: This API element is subject to removal in a future version.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 long
getSize()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the size of the iterator.Object[]
nextObjects()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the underlying array.void
skip(long items)
Deprecated, for removal: This API element is subject to removal in a future version.Skips the firstitems
elements in the array.
-
-
-
Constructor Detail
-
ArrayIterator
public ArrayIterator(Object[] elements)
Deprecated, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.Returns the size of the iterator.- Specified by:
getSize
in interfaceRemoteIterator
- Returns:
- length of the iterator
- See Also:
RemoteIterator.getSize()
-
skip
public void skip(long items) throws IllegalArgumentException, NoSuchElementException
Deprecated, for removal: This API element is subject to removal in a future version.Skips the firstitems
elements in the array. Skips the given number of elements in this iteration.- Specified by:
skip
in 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, for removal: This API element is subject to removal in a future version.Returns the underlying array. Returns an array of remote references to the next elements in this iterator. Returnsnull
if 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:
nextObjects
in interfaceRemoteIterator
- Returns:
- array of remote references, or
null
- Throws:
IllegalArgumentException
- ifmaxItems
is not positive- See Also:
Iterator.next()
-
-