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>
    A CloseableIterator that also allows callers to attach Runnable instances to it, so that when this iterator is closed, those Runnables are also invoked.
    • 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