org.apache.jackrabbit.rmi.remote
Interface RemoteIterator

All Superinterfaces:
Remote
All Known Implementing Classes:
ArrayIterator, BufferIterator, ServerAccessControlPolicyIterator, ServerIterator, ServerNodeIterator, ServerNodeTypeIterator, ServerPrincipalIterator, ServerPropertyIterator, ServerRowIterator, ServerVersionIterator

public interface RemoteIterator
extends Remote

Remote version of the JCR RangeIterator interface. Used by the ServerIterator and ClientIterator classes to provide transparent RMI access to remote iterators.

This interface allows both the client and server side to control the amount of buffering used to increase performance.


Method Summary
 long getSize()
          Returns the size of the iteration, or -1 if the size is unknown.
 Object[] nextObjects()
          Returns an array of remote references to the next elements in this iterator.
 void skip(long items)
          Skips the given number of elements in this iteration.
 

Method Detail

getSize

long getSize()
             throws RemoteException
Returns the size of the iteration, or -1 if the size is unknown.

Returns:
size of the iteration, or -1 if unknown
Throws:
RemoteException - on RMI errors
See Also:
RangeIterator.getSize()

skip

void skip(long items)
          throws NoSuchElementException,
                 RemoteException
Skips the given number of elements in this iteration.

Parameters:
items - number of elements to skip
Throws:
NoSuchElementException - if skipped past the last element
RemoteException - on RMI errors
See Also:
RangeIterator.skip(long)

nextObjects

Object[] nextObjects()
                     throws IllegalArgumentException,
                            RemoteException
Returns an array of remote references to the next elements in this iterator. Returns null 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.

Returns:
array of remote references, or null
Throws:
IllegalArgumentException - if maxItems is not positive
RemoteException - on RMI errors
See Also:
Iterator.next()


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.