Class SafeIteratorImpl<E>

java.lang.Object
com.espertech.esper.runtime.internal.kernel.statement.SafeIteratorImpl<E>
All Implemented Interfaces:
com.espertech.esper.common.client.util.SafeIterator<E>, Iterator<E>
Direct Known Subclasses:
SafeIteratorWTableImpl

public class SafeIteratorImpl<E> extends Object implements com.espertech.esper.common.client.util.SafeIterator<E>
Implements the safe iterator. The class is passed a lock that is locked already, to release when the close method closes the iterator.
  • Constructor Details

    • SafeIteratorImpl

      public SafeIteratorImpl(com.espertech.esper.common.internal.context.util.StatementAgentInstanceLock iteratorLock, Iterator<E> underlying)
      Ctor.
      Parameters:
      iteratorLock - for locking resources to safely-iterate over
      underlying - is the underlying iterator to protect
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<E>
    • next

      public E next()
      Specified by:
      next in interface Iterator<E>
    • close

      public void close()
      Specified by:
      close in interface com.espertech.esper.common.client.util.SafeIterator<E>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<E>