com.bigdata.rdf.internal.encoder
Class SolutionSetStreamDecoder

java.lang.Object
  extended by com.bigdata.rdf.internal.encoder.SolutionSetStreamDecoder
All Implemented Interfaces:
ICloseableIterator<IBindingSet[]>, Iterator<IBindingSet[]>

public class SolutionSetStreamDecoder
extends Object
implements ICloseableIterator<IBindingSet[]>

Stream decoder for solution sets (chunk oriented).

Author:
Bryan Thompson
See Also:
SolutionSetStreamEncoder

Constructor Summary
SolutionSetStreamDecoder(String name, DataInputStream in, long solutionSetCount)
           
 
Method Summary
 void close()
          Closes the iterator, releasing any associated resources.
 boolean hasNext()
           
 IBindingSet[] next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolutionSetStreamDecoder

public SolutionSetStreamDecoder(String name,
                                DataInputStream in,
                                long solutionSetCount)
Parameters:
name - The name of the solution set.
in - The solutions are read from this stream.
solutionSetCount - The #of solutions to be read from the stream.
Throws:
IOException
Method Detail

close

public void close()
Description copied from interface: ICloseableIterator
Closes the iterator, releasing any associated resources. This method MAY be invoked safely if the iterator is already closed. Implementations of this interface MUST invoke ICloseableIterator.close() if Iterator.hasNext() method returns false to ensure that the iterator is closed (and its resources release) as soon as it is exhausted.

Note: Implementations that support Iterator.remove() MUST NOT eagerly close the iterator when it is exhausted since that would make it impossible to remove the last visited statement. Instead they MUST wait for an explicit ICloseableIterator.close() by the application.

Specified by:
close in interface ICloseableIterator<IBindingSet[]>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<IBindingSet[]>

next

public IBindingSet[] next()
Specified by:
next in interface Iterator<IBindingSet[]>

remove

public void remove()
Specified by:
remove in interface Iterator<IBindingSet[]>


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