Class AbstractCloseableIteration<E,X extends java.lang.Exception>
- java.lang.Object
-
- org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E,X>
-
- All Implemented Interfaces:
java.lang.AutoCloseable,CloseableIteration<E,X>,Iteration<E,X>
- Direct Known Subclasses:
CloseableIteratorIteration,CollectionIteration,ConstructTupleFunction.GraphQueryResultIteration,ConvertingIteration,DelayedEvaluationIteration,DelayedIteration,EmptyIteration,ExceptionConvertingIteration,IterationWrapper,LookAheadIteration,QueryContextIteration,QueryResults.GraphQueryResultFilter,QueryResults.TupleQueryResultFilter,RepositoryResult,SelectTupleFunction.TupleQueryResultIteration,SingletonIteration
@Deprecated(since="4.1.0") public abstract class AbstractCloseableIteration<E,X extends java.lang.Exception> extends java.lang.Object implements CloseableIteration<E,X>
Deprecated.Base class forCloseableIterations offering common functionality. This class keeps track of whether the iteration has been closed and handles multiple calls toclose()by ignoring all but the first call.Instances of this class is not safe to be accessed from multiple threads at the same time.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanclosedDeprecated.Flag indicating whether this iteration has been closed.
-
Constructor Summary
Constructors Constructor Description AbstractCloseableIteration()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.CallshandleClose()upon first call and makes sure the resource closures are only executed once.protected voidhandleClose()Deprecated.Called byclose()when it is called for the first time.booleanisClosed()Deprecated.Checks whether this CloseableIteration has been closed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration
stream
-
-
-
-
Method Detail
-
isClosed
public final boolean isClosed()
Deprecated.Checks whether this CloseableIteration has been closed.- Returns:
- true if the CloseableIteration has been closed, false otherwise.
-
close
public final void close() throws X extends java.lang.ExceptionDeprecated.CallshandleClose()upon first call and makes sure the resource closures are only executed once.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceCloseableIteration<E,X extends java.lang.Exception>- Throws:
X extends java.lang.Exception
-
-