Class IterAbortable<T>

java.lang.Object
org.apache.jena.atlas.iterator.IteratorWrapper<T>
org.apache.jena.sparql.engine.iterator.IterAbortable<T>
All Implemented Interfaces:
Iterator<T>, org.apache.jena.atlas.iterator.IteratorCloseable<T>, org.apache.jena.atlas.lib.Closeable, Abortable

public class IterAbortable<T> extends org.apache.jena.atlas.iterator.IteratorWrapper<T> implements Abortable, org.apache.jena.atlas.iterator.IteratorCloseable<T>
Plain iterator version to add "abort" functionality. Iterator that adds an abort operation which can be called at any time, including from another thread, and causes the iterator to throw an exception when next touched (hasNext, next).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Can call asynchronously at any time
    boolean
     
     
    void
     

    Methods inherited from class org.apache.jena.atlas.iterator.IteratorWrapper

    close, forEachRemaining

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.jena.atlas.lib.Closeable

    close

    Methods inherited from interface java.util.Iterator

    forEachRemaining
  • Constructor Details

    • IterAbortable

      public IterAbortable(Iterator<T> iterator)
  • Method Details

    • abort

      public void abort()
      Can call asynchronously at any time
      Specified by:
      abort in interface Abortable
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
      Overrides:
      hasNext in class org.apache.jena.atlas.iterator.IteratorWrapper<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
      Overrides:
      next in class org.apache.jena.atlas.iterator.IteratorWrapper<T>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>
      Overrides:
      remove in class org.apache.jena.atlas.iterator.IteratorWrapper<T>