com.bigdata.service.proxy
Class RemoteAsynchronousIteratorImpl<E>
java.lang.Object
com.bigdata.service.proxy.RemoteAsynchronousIteratorImpl<E>
- Type Parameters:
T -
- All Implemented Interfaces:
- RemoteAsynchronousIterator<E>, Remote
public class RemoteAsynchronousIteratorImpl<E>
- extends Object
- implements RemoteAsynchronousIterator<E>
A helper object that provides the API of IAsynchronousIterator but
whose methods throw IOException and are therefore compatible with
Remote and Exporter.
- Version:
- $Id: RemoteAsynchronousIteratorImpl.java 2265 2009-10-26 12:51:06Z thompsonbry $
- Author:
- Bryan Thompson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteAsynchronousIteratorImpl
public RemoteAsynchronousIteratorImpl(IAsynchronousIterator<E> itr)
- Ctor variant does not support
nextElement().
- Parameters:
itr - The source iterator (local object).
RemoteAsynchronousIteratorImpl
public RemoteAsynchronousIteratorImpl(IAsynchronousIterator<E> itr,
IStreamSerializer<E> serializer)
- Ctor variant optionally supports
nextElement().
- Parameters:
itr - The source iterator (local object).serializer - Optional, but nextElement() only works when you
specify an IStreamSerializer.
close
public void close()
throws IOException
- Specified by:
close in interface RemoteAsynchronousIterator<E>
- Throws:
IOException- See Also:
ICloseableIterator.close()
hasNext
public boolean hasNext()
throws IOException
- Specified by:
hasNext in interface RemoteAsynchronousIterator<E>
- Throws:
IOException- See Also:
Iterator.hasNext()
hasNext
public boolean hasNext(long timeout,
TimeUnit unit)
throws IOException,
InterruptedException
- Specified by:
hasNext in interface RemoteAsynchronousIterator<E>
- Throws:
IOException
InterruptedException- See Also:
IAsynchronousIterator.hasNext(long, TimeUnit)
isExhausted
public boolean isExhausted()
throws IOException
- Specified by:
isExhausted in interface RemoteAsynchronousIterator<E>
- Throws:
IOException- See Also:
IAsynchronousIterator.isExhausted()
next
public E next()
throws IOException
- Specified by:
next in interface RemoteAsynchronousIterator<E>
- Throws:
IOException- See Also:
Iterator.next()
next
public E next(long timeout,
TimeUnit unit)
throws IOException,
InterruptedException
- Specified by:
next in interface RemoteAsynchronousIterator<E>
- Throws:
IOException
InterruptedException- See Also:
IAsynchronousIterator.next(long, TimeUnit)
remove
public void remove()
throws IOException
- Specified by:
remove in interface RemoteAsynchronousIterator<E>
- Throws:
IOException- See Also:
Iterator.remove()
nextElement
public RemoteAsynchronousIterator.RemoteElement<E> nextElement()
- Description copied from interface:
RemoteAsynchronousIterator
- Method applies a custom serializer to the value returned by
RemoteAsynchronousIterator.next() and returns a RemoteAsynchronousIterator.RemoteElement that can be
transported by RMI and which knows how to de-serialize the element on the
other end.
- Specified by:
nextElement in interface RemoteAsynchronousIterator<E>
- Returns:
-
- Throws:
UnsupportedOperationException - if you did not specify an IStreamSerializer to the ctor.
Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.