Package org.infinispan.stream.impl
Interface IteratorHandler.OnCloseIterator<E>
-
- Type Parameters:
E-
- All Superinterfaces:
AutoCloseable,org.infinispan.commons.util.CloseableIterator<E>,Iterator<E>
- Enclosing class:
- IteratorHandler
public static interface IteratorHandler.OnCloseIterator<E> extends org.infinispan.commons.util.CloseableIterator<E>ACloseableIteratorthat also allows callers to attachRunnableinstances to it, so that when this iterator is closed, those Runnables are also invoked.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IteratorHandler.OnCloseIterator<E>onClose(Runnable runnable)Register a runnable to be invoked when this iterator is closed-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
onClose
IteratorHandler.OnCloseIterator<E> onClose(Runnable runnable)
Register a runnable to be invoked when this iterator is closed- Parameters:
runnable- the runnable to run- Returns:
- this iterator again
-
-