Package org.infinispan.commons.util
Interface CloseableIterator<E>
- All Superinterfaces:
- AutoCloseable,- Iterator<E>
- All Known Subinterfaces:
- ClosableIteratorWithCount<E>
- All Known Implementing Classes:
- CloseableSuppliedIterator,- ConcatIterator,- FilterIterator,- IteratorMapper,- LazyConcatIterator,- RemovableCloseableIterator,- RemovableCloseableIterator,- ScrollerIteratorAdaptor
Interface that provides semantics of a 
Iterator and AutoCloseable interfaces.  This is
 useful when you have data that must be iterated on and may hold resources in the underlying implementation that
 must be closed.
 Some implementations may close resources automatically when the iterator is finished being iterated on however
 this is an implementation detail and all callers should call AutoCloseable.close() method to be
 sure all resources are freed properly.
- Since:
- 7.0
- Author:
- wburns
- 
Method SummaryMethods inherited from interface java.util.IteratorforEachRemaining, hasNext, next, remove
- 
Method Details- 
closevoid close()- Specified by:
- closein interface- AutoCloseable
 
 
-