com.bigdata.striterator
Interface ICloseableIterator<E>

All Superinterfaces:
Iterator<E>
All Known Subinterfaces:
BigdataStatementIterator, BigdataValueIterator, IAsynchronousIterator<E>, IChunkedIterator<E>, IChunkedOrderedIterator<R>, IChunkedOrderedStriterator<I,E>, IChunkedStriterator<I,E>, IJustificationIterator, IMultiSourceCloseableIterator<E>
All Known Implementing Classes:
AbstractChunkedResolverator, BackchainOwlSameAsIterator, BackchainOwlSameAsPropertiesIterator, BackchainOwlSameAsPropertiesPIterator, BackchainOwlSameAsPropertiesPOIterator, BackchainOwlSameAsPropertiesSPIterator, BackchainOwlSameAsPropertiesSPOIterator, BackchainTypeResourceIterator, BackchainTypeResourceIterator.PushbackIterator, BigdataBindingSetResolverator, BigdataOpenRDFBindingSetsResolverator, BigdataSolutionResolverator, BigdataStatementIteratorImpl, BigdataValueIteratorImpl, BlockingBuffer.BlockingIterator, ChunkConsumerIterator, ChunkedArrayIterator, ChunkedArraysIterator, ChunkedConvertingIterator, ChunkedMaterializationIterator, ChunkedOrderedStriterator, ChunkedResolvingIterator, ChunkedStriterator, ChunkedWrappedIterator, Chunkerator, ClientAsynchronousIterator, ClosableEmptyIterator, ClosableSingleItemIterator, CloseableIteratorWrapper, Dechunkerator, DelegateChunkedIterator, DistinctSPOIterator, EmptyAsynchronousIterator, EmptyChunkedIterator, EmptyCloseableIterator, EmptyStatementIterator, EntryScanIterator, FullyBufferedJustificationIterator, GenericChunkedOrderedStriterator, GenericChunkedStriterator, JustificationIterator, MultiSourceSequentialCloseableIterator, OwlSameAsPropertiesExpandingIterator, PushbackIterator, RunningQueryCloseableIterator, Sesame2BigdataIterator, SingleValueChunkedIterator, SingleValueIterator, SolutionSetStatserator, SolutionSetStreamDecoder, SPOArrayIterator, Striterator, ThickAsynchronousIterator, ThickCloseableIterator, WrappedAsynchronousIterator, WrappedRemoteChunkedIterator, XPropertyIterator

public interface ICloseableIterator<E>
extends Iterator<E>

An iterator that defines a close() method - you MUST close instances of this interface. Many implementation depends on this in order to release resources, terminate tasks, etc.

Version:
$Id: ICloseableIterator.java 5023 2011-08-05 15:46:01Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 void close()
          Closes the iterator, releasing any associated resources.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

close

void close()
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 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 close() by the application.



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