Package org.infinispan.commons.util
Interface CloseableIteratorCollection<E>
-
- All Superinterfaces:
java.util.Collection<E>,java.lang.Iterable<E>
- All Known Subinterfaces:
CacheCollection<E>,CacheSet<E>,CloseableIteratorSet<E>
- All Known Implementing Classes:
org.infinispan.commands.read.AbstractCloseableIteratorCollection,AbstractDelegatingCacheCollection,AbstractDelegatingCacheSet,AbstractDelegatingCloseableIteratorCollection,AbstractDelegatingCloseableIteratorSet,CacheSetMapper,CloseableIteratorCollectionAdapter,CloseableIteratorSetAdapter,DistributionBulkInterceptor.BackingEntrySet,DistributionBulkInterceptor.BackingKeySet,DistributionBulkInterceptor.TxBackingEntrySet,WriteableCacheCollectionMapper,WriteableCacheSetMapper
public interface CloseableIteratorCollection<E> extends java.util.Collection<E>A collection that defines an iterator method that returns aCloseableIteratorinstead of a non closeable one. This is needed so that iterators can be properly cleaned up. All other methods will internally clean up any iterators created and don't have other side effects.- Since:
- 7.0
- Author:
- wburns
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CloseableIterator<E>iterator()default java.util.stream.Stream<E>parallelStream()CloseableSpliterator<E>spliterator()default java.util.stream.Stream<E>stream()
-
-
-
Method Detail
-
iterator
CloseableIterator<E> iterator()
This iterator should be explicitly closed when iteration upon it is completed. Failure to do so could cause resources to not be freed properly
-
spliterator
CloseableSpliterator<E> spliterator()
This spliterator should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
-
stream
default java.util.stream.Stream<E> stream()
This stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
- Specified by:
streamin interfacejava.util.Collection<E>
-
-