Class DelayedIteration<E,​X extends java.lang.Exception>

  • All Implemented Interfaces:
    java.lang.AutoCloseable, CloseableIteration<E,​X>, Iteration<E,​X>
    Direct Known Subclasses:
    OrderIterator, QueryEvaluationStep.DelayedEvaluationIteration

    @Deprecated(since="4.1.0")
    public abstract class DelayedIteration<E,​X extends java.lang.Exception>
    extends AbstractCloseableIteration<E,​X>
    Deprecated.
    An iteration that delays the creation of the underlying iteration until it is being accessed. This is mainly useful for situations where iteration creation adds considerable overhead but where the iteration may not actually be used, or where a created iteration consumes scarce resources like JDBC-connections or memory. Subclasses must implement the createIteration method, which is called once when the iteration is first needed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Iteration<? extends E,​? extends X> iter
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DelayedIteration()
      Deprecated.
      Creates a new DelayedIteration.
    • Field Detail

      • iter

        private Iteration<? extends E,​? extends X extends java.lang.Exception> iter
        Deprecated.
    • Constructor Detail

      • DelayedIteration

        protected DelayedIteration()
        Deprecated.
        Creates a new DelayedIteration.
    • Method Detail

      • createIteration

        protected abstract Iteration<? extends E,​? extends X> createIteration()
                                                                             throws X extends java.lang.Exception
        Deprecated.
        Creates the iteration that should be iterated over. This method is called only once, when the iteration is first needed.
        Throws:
        X extends java.lang.Exception
      • hasNext

        public boolean hasNext()
                        throws X extends java.lang.Exception
        Deprecated.
        Calls the hasNext method of the underlying iteration.
        Returns:
        true if the iteration has more elements.
        Throws:
        X
        X extends java.lang.Exception
      • next

        public E next()
               throws X extends java.lang.Exception
        Deprecated.
        Calls the next method of the underlying iteration.
        Returns:
        the next element in the iteration.
        Throws:
        X extends java.lang.Exception
      • remove

        public void remove()
                    throws X extends java.lang.Exception
        Deprecated.
        Calls the remove method of the underlying iteration.
        Throws:
        X extends java.lang.Exception
      • handleClose

        protected void handleClose()
                            throws X extends java.lang.Exception
        Deprecated.
        Closes this iteration as well as the underlying iteration if it has already been created and happens to be a CloseableIteration.
        Overrides:
        handleClose in class AbstractCloseableIteration<E,​X extends java.lang.Exception>
        Throws:
        X
        X extends java.lang.Exception