com.bigdata.service.proxy
Class RemoteChunkedIterator<E>

java.lang.Object
  extended by com.bigdata.service.proxy.RemoteChunkedIterator<E>
Type Parameters:
E - The generic type of the component elements visited by the source iterator.
All Implemented Interfaces:
IRemoteChunkedIterator<E>, Remote

public class RemoteChunkedIterator<E>
extends Object
implements IRemoteChunkedIterator<E>

Wrapper for an IAsynchronousIterator exposing an interface suitable for export as a proxy object using RMI to communicate back with itself and pull data efficiently from the source iterator.

Version:
$Id: RemoteChunkedIterator.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected static boolean DEBUG
           
protected static boolean INFO
           
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
RemoteChunkedIterator(IAsynchronousIterator<E[]> sourceIterator, IStreamSerializer<E[]> serializer, IKeyOrder<E> keyOrder)
           
 
Method Summary
 void close()
          Close the source iterator.
 IRemoteChunk<E> nextChunk()
          Return the next IRemoteChunk from the source iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final transient org.apache.log4j.Logger log

INFO

protected static final boolean INFO

DEBUG

protected static final boolean DEBUG
Constructor Detail

RemoteChunkedIterator

public RemoteChunkedIterator(IAsynchronousIterator<E[]> sourceIterator,
                             IStreamSerializer<E[]> serializer,
                             IKeyOrder<E> keyOrder)
Parameters:
sourceIterator - The source iterator.
serializer - The object that will be used to (de-)serialize the elements.
keyOrder - The natural order of the visited elements if known and otherwise null.
Method Detail

close

public void close()
           throws IOException
Close the source iterator.

Specified by:
close in interface IRemoteChunkedIterator<E>
Throws:
IOException

nextChunk

public IRemoteChunk<E> nextChunk()
                          throws IOException
Return the next IRemoteChunk from the source iterator. If it is exhausted then return an IRemoteChunk which indicates that no more results are available.

Specified by:
nextChunk in interface IRemoteChunkedIterator<E>
Returns:
The next IRemoteChunk.
Throws:
IOException


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.