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

java.lang.Object
  extended by com.bigdata.service.proxy.RemoteChunk<E>
Type Parameters:
E -
All Implemented Interfaces:
IRemoteChunk<E>, Externalizable, Serializable

public class RemoteChunk<E>
extends Object
implements IRemoteChunk<E>, Externalizable

A chunk of elements materialized from a remote iterator together with some metadata about the state of the remote iterator (whether or not it is exhausted, what its IKeyOrder is (if any)).

Version:
$Id: RemoteChunk.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Constructor Summary
RemoteChunk()
          De-serialization ctor.
RemoteChunk(boolean exhausted, IStreamSerializer<E[]> serializer, IKeyOrder<E> keyOrder, E[] a)
           
 
Method Summary
 E[] getChunk()
          The elements in the current chunk -or- null iff there are NO elements in the chunk.
 IKeyOrder<E> getKeyOrder()
          The natural sort orded of the elements in this chunk -or- null if the elements are not in any known order.
 boolean isExhausted()
          true iff the iterator will not return any more chunks.
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteChunk

public RemoteChunk()
De-serialization ctor.


RemoteChunk

public RemoteChunk(boolean exhausted,
                   IStreamSerializer<E[]> serializer,
                   IKeyOrder<E> keyOrder,
                   E[] a)
Method Detail

getChunk

public E[] getChunk()
Description copied from interface: IRemoteChunk
The elements in the current chunk -or- null iff there are NO elements in the chunk.

Specified by:
getChunk in interface IRemoteChunk<E>

getKeyOrder

public IKeyOrder<E> getKeyOrder()
Description copied from interface: IRemoteChunk
The natural sort orded of the elements in this chunk -or- null if the elements are not in any known order.

Note: The returned value should be the same each time for a given source iterator. It is put here so that we can avoid an RMI for this property and the expense of serializing the value with each chunk.

Specified by:
getKeyOrder in interface IRemoteChunk<E>

isExhausted

public boolean isExhausted()
Description copied from interface: IRemoteChunk
true iff the iterator will not return any more chunks.

Specified by:
isExhausted in interface IRemoteChunk<E>

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException


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