com.artima.place
Interface LinkItemIterator
- public interface LinkItemIterator
A iterator over a potentially distributed collection of
LinkItem
s. LinkItemIterator
supports distributed
collections by including RemoteException
in the throws
clauses of all its methods. In addition, LinkItemIterator
provides cache support via its cachNext
method, which enables
clients to manage network traffic.
Method Summary |
void |
cacheNext(int cacheSize)
Requests that the next cacheSize elements be cached
locally. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
LinkItem |
next()
Returns the next element in the iteration. |
hasNext
public boolean hasNext()
throws java.rmi.RemoteException
- Returns
true
if the iteration has more elements.
- Returns:
true
if the iteration has more elements.- Throws:
java.rmi.RemoteException
- if a network problem prevents this method
from fulfilling its contractual obligations
next
public LinkItem next()
throws java.rmi.RemoteException
- Returns the next element in the iteration.
- Returns:
- the next key in the iteration
- Throws:
java.rmi.RemoteException
- if a network problem prevents this method
from fulfilling its contractual obligations
cacheNext
public void cacheNext(int cacheSize)
throws java.rmi.RemoteException
- Requests that the next
cacheSize
elements be cached
locally. Any elements remaining in the iteration, up to the passed
cacheSize
, that have not yet been downloaded across the
network will be downloaded when this method is invoked.
- Parameters:
cacheSize
- the number of elements to cache locally.- Throws:
java.lang.IllegalArgumentException
- if passed cacheSize
is
less than or equal to zero.java.rmi.RemoteException
- if a network problem prevents this method
from fulfilling its contractual obligations