Class QueueIteration<E,​T extends java.lang.Exception>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private E afterLast
      Deprecated.
       
      private java.util.concurrent.atomic.AtomicBoolean done
      Deprecated.
       
      private java.util.Queue<java.lang.Exception> exceptions
      Deprecated.
       
      private java.util.concurrent.BlockingQueue<E> queue
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected QueueIteration​(int capacity)
      Deprecated.
      Creates an QueueIteration with the given (fixed) capacity and default access policy.
      protected QueueIteration​(int capacity, boolean fair)
      Deprecated.
      Creates an QueueIteration with the given (fixed) capacity and the specified access policy.
      protected QueueIteration​(int capacity, boolean fair, java.lang.ref.WeakReference<?> callerRef)
      Deprecated, for removal: This API element is subject to removal in a future version.
      WeakReference is no longer supported as a way to automatically close this iteration.
      protected QueueIteration​(int capacity, java.lang.ref.WeakReference<?> callerRef)
      Deprecated, for removal: This API element is subject to removal in a future version.
      WeakReference is no longer supported as a way to automatically close this iteration.
      protected QueueIteration​(java.util.concurrent.BlockingQueue<E> queue)
      Deprecated.
      Creates an QueueIteration with the given BlockingQueue as its backing queue.
      It may not be threadsafe to modify or access the given BlockingQueue from other locations.
      protected QueueIteration​(java.util.concurrent.BlockingQueue<E> queue, java.lang.ref.WeakReference<?> callerRef)
      Deprecated, for removal: This API element is subject to removal in a future version.
      WeakReference is no longer supported as a way to automatically close this iteration.
    • Field Detail

      • done

        private final java.util.concurrent.atomic.AtomicBoolean done
        Deprecated.
      • queue

        private final java.util.concurrent.BlockingQueue<E> queue
        Deprecated.
      • afterLast

        private final E afterLast
        Deprecated.
      • exceptions

        private final java.util.Queue<java.lang.Exception> exceptions
        Deprecated.
    • Constructor Detail

      • QueueIteration

        protected QueueIteration​(int capacity)
        Deprecated.
        Creates an QueueIteration with the given (fixed) capacity and default access policy.
        Parameters:
        capacity - the capacity of this queue
      • QueueIteration

        @Deprecated(since="4.1.2",
                    forRemoval=true)
        protected QueueIteration​(int capacity,
                                 java.lang.ref.WeakReference<?> callerRef)
        Deprecated, for removal: This API element is subject to removal in a future version.
        WeakReference is no longer supported as a way to automatically close this iteration. The recommended approach to automatically closing an iteration on garbage collection is to use a Cleaner.
        Creates an QueueIteration with the given (fixed) capacity and default access policy.
        Parameters:
        capacity - the capacity of this queue
      • QueueIteration

        @Deprecated(since="4.1.2",
                    forRemoval=true)
        protected QueueIteration​(int capacity,
                                 boolean fair,
                                 java.lang.ref.WeakReference<?> callerRef)
        Deprecated, for removal: This API element is subject to removal in a future version.
        WeakReference is no longer supported as a way to automatically close this iteration. The recommended approach to automatically closing an iteration on garbage collection is to use a Cleaner.
        Creates an QueueIteration with the given (fixed) capacity and the specified access policy.
        Parameters:
        capacity - the capacity of this queue
        fair - if true then queue accesses for threads blocked on insertion or removal, are processed in FIFO order; if false the access order is unspecified.
      • QueueIteration

        protected QueueIteration​(int capacity,
                                 boolean fair)
        Deprecated.
        Creates an QueueIteration with the given (fixed) capacity and the specified access policy.
        Parameters:
        capacity - the capacity of this queue
        fair - if true then queue accesses for threads blocked on insertion or removal, are processed in FIFO order; if false the access order is unspecified.
      • QueueIteration

        @Deprecated(since="4.1.2",
                    forRemoval=true)
        protected QueueIteration​(java.util.concurrent.BlockingQueue<E> queue,
                                 java.lang.ref.WeakReference<?> callerRef)
        Deprecated, for removal: This API element is subject to removal in a future version.
        WeakReference is no longer supported as a way to automatically close this iteration. The recommended approach to automatically closing an iteration on garbage collection is to use a Cleaner.
        Creates an QueueIteration with the given BlockingQueue as its backing queue.
        It may not be threadsafe to modify or access the given BlockingQueue from other locations. This method only enables the default ArrayBlockingQueue to be overridden.
        Parameters:
        queue - A BlockingQueue that is not used in other locations, but will be used as the backing Queue implementation for this cursor.
      • QueueIteration

        protected QueueIteration​(java.util.concurrent.BlockingQueue<E> queue)
        Deprecated.
        Creates an QueueIteration with the given BlockingQueue as its backing queue.
        It may not be threadsafe to modify or access the given BlockingQueue from other locations. This method only enables the default ArrayBlockingQueue to be overridden.
        Parameters:
        queue - A BlockingQueue that is not used in other locations, but will be used as the backing Queue implementation for this cursor.
    • Method Detail

      • convert

        protected abstract T convert​(java.lang.Exception e)
        Deprecated.
        Converts an exception from the underlying iteration to an exception of type X.
      • toss

        public void toss​(java.lang.Exception exception)
        Deprecated.
        The next time LookAheadIteration.next() is called this exception will be thrown. If it is not a QueryEvaluationException or RuntimeException it will be wrapped in a QueryEvaluationException.
      • put

        public void put​(E item)
                 throws java.lang.InterruptedException,
                        T extends java.lang.Exception
        Deprecated.
        Adds another item to the queue, blocking while the queue is full.
        Throws:
        java.lang.InterruptedException
        T extends java.lang.Exception
      • done

        public void done()
        Deprecated.
        Indicates the method put(Object) will not be called in the queue anymore.
      • getNextElement

        public E getNextElement()
                         throws T extends java.lang.Exception
        Deprecated.
        Returns the next item in the queue, which may be null, or throws an exception.
        Specified by:
        getNextElement in class LookAheadIteration<E,​T extends java.lang.Exception>
        Returns:
        The next element, or null if no more elements are available.
        Throws:
        T extends java.lang.Exception
      • checkException

        public void checkException()
                            throws T extends java.lang.Exception
        Deprecated.
        Throws:
        T extends java.lang.Exception
      • isAfterLast

        private boolean isAfterLast​(E take)
        Deprecated.
      • createAfterLast

        private E createAfterLast()
        Deprecated.