Interface CloseableIteration<E,X extends java.lang.Exception>
-
- All Superinterfaces:
java.lang.AutoCloseable
,Iteration<E,X>
- All Known Subinterfaces:
GraphQueryResult
,QueryResult<T>
,TupleQueryResult
- All Known Implementing Classes:
AbstractCloseableIteration
,AbstractParserQuery.QueryInterruptIteration
,AbstractParserQuery.QueryInterruptIteration
,BackgroundGraphResult
,BackgroundTupleResult
,BadlyDesignedLeftJoinIterator
,BottomUpJoinIterator
,CleanerGraphQueryResult
,CleanerIteration
,CleanerTupleQueryResult
,CloseableIteratorIteration
,CloseablePeakableIteration
,CollectionIteration
,CollectionIteration
,CompatibleBindingSetFilter
,ConstructTupleFunction.GraphQueryResultIteration
,ConvertingIteration
,CrossProductIteration
,DefaultEvaluationStrategy.ResultSizeCountingIterator
,DefaultEvaluationStrategy.TimedIterator
,DelayedEvaluationIteration
,DelayedIteration
,DescribeIteration
,DistinctIteration
,DistinctModelReducingUnionIteration
,DualUnionIteration
,EmptyIteration
,ExceptionConvertingIteration
,ExtensionIterator
,FilterIteration
,FilterIterator
,GraphQueryResultImpl
,GroupIterator
,HashJoinIteration
,InsertBindingSetCursor
,IntersectIteration
,IteratingGraphQueryResult
,IteratingTupleQueryResult
,IterationWrapper
,JoinExecutorBase
,JoinExecutorBase
,JoinIterator
,LeftJoinIterator
,LimitedSizeDistinctIteration
,LimitIteration
,LockingIteration
,LoggingCloseableIteration
,LookAheadIteration
,MemStatementIterator
,MemStatementIteratorCache.CachedIteration
,MemTripleIterator
,MinusIteration
,MultiProjectionIterator
,MutableTupleQueryResult
,OffsetIteration
,OnlyNonUnique
,OrderIterator
,PathIteration
,ProjectionIterator
,QueryContextIteration
,QueryEvaluationStep.DelayedEvaluationIteration
,QueryResults.CleanerGraphQueryResult
,QueryResults.GraphQueryResultFilter
,QueryResults.TupleQueryResultFilter
,QueueCursor
,QueueIteration
,ReducedIteration
,RepositoryFederatedService.BatchingServiceIteration
,RepositoryFederatedService.CloseConnectionIteration
,RepositoryFederatedService.FallbackServiceIteration
,RepositoryResult
,SailBaseIteration
,SailCloseableIteration
,SailClosingIteration
,SelectTupleFunction.TupleQueryResultIteration
,ServiceCrossProductIteration
,ServiceJoinConversionIteration
,ServiceJoinConversionIteration
,ServiceJoinIterator
,SilentIteration
,SilentIteration
,SingleCloseablePlanNode.SingleCloseableIteration
,SingletonIteration
,SPARQLCrossProductIteration
,SPARQLMinusIteration
,StatementPatternQueryEvaluationStep.ConvertStatementToBindingSetIterator
,StatementPatternQueryEvaluationStep.JoinStatementWithBindingSetIterator
,TimeLimitIteration
,TripleSourceIterationWrapper
,TupleExprWrapperIteration
,TupleQueryResultImpl
,UnionIteration
,Unique.TargetAndValueSortIterator
,ZeroLengthPathIteration
@Deprecated(since="4.1.0") public interface CloseableIteration<E,X extends java.lang.Exception> extends Iteration<E,X>, java.lang.AutoCloseable
Deprecated.In the future this interface will stop extendingIteration
and instead declare the same interface methods directly. The interface will also stop requiring implementations to automatically close when exhausted, instead making this an optional feature and requiring the user to always call close. This interface may also be removed.AnIteration
that can be closed to free resources that it is holding. CloseableIterations automatically free their resources when exhausted. If not read until exhaustion or if you want to make sure the iteration is properly closed, any code using the iterator should be placed in a try-with-resources block, closing the iteration automatically, e.g.:try (CloseableIteration<Object, Exception> iter = ...) { // read objects from the iterator } catch(Exception e) { // process the exception that can be thrown while processing. }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.Closes this iteration, freeing any resources that it is holding.default java.util.stream.Stream<E>
stream()
Deprecated.Convert the results to a Java 8 Stream.
-
-
-
Method Detail
-
stream
default java.util.stream.Stream<E> stream()
Deprecated.Convert the results to a Java 8 Stream.
-
close
void close() throws X extends java.lang.Exception
Deprecated.Closes this iteration, freeing any resources that it is holding. If the iteration has already been closed then invoking this method has no effect.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
X extends java.lang.Exception
-
-