Class ProgressRowSequence

java.lang.Object
uk.ac.starlink.table.WrapperRowSequence
uk.ac.starlink.table.join.ProgressRowSequence
All Implemented Interfaces:
Closeable, AutoCloseable, uk.ac.starlink.table.RowData, uk.ac.starlink.table.RowSequence, uk.ac.starlink.util.Sequence

public class ProgressRowSequence extends uk.ac.starlink.table.WrapperRowSequence
RowSequence which logs progress to a ProgressIndicator. Has to contain a couple methods extra to the RowSequence interface to make it behave properly.
Since:
6 Aug 2004
Author:
Mark Taylor (Starlink)
  • Field Summary

    Fields inherited from class uk.ac.starlink.table.WrapperRowSequence

    baseSeq
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProgressRowSequence(uk.ac.starlink.table.StarTable table, ProgressIndicator indicator, String stage)
    Constructs a new ProgressRowSequence.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Indicates that progress is at an end.
    boolean
     
    boolean
    Invokes next() and also updates the progress indicator.

    Methods inherited from class uk.ac.starlink.table.WrapperRowSequence

    getCell, getRow, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ProgressRowSequence

      public ProgressRowSequence(uk.ac.starlink.table.StarTable table, ProgressIndicator indicator, String stage) throws IOException
      Constructs a new ProgressRowSequence.
      Parameters:
      table - table to get the base row sequence from
      indicator - indicator to be informed about progress
      stage - string describing this stage of the process
      Throws:
      IOException
  • Method Details

    • nextProgress

      public boolean nextProgress() throws IOException, InterruptedException
      Invokes next() and also updates the progress indicator.
      Throws:
      IOException
      InterruptedException
    • next

      public boolean next() throws IOException
      Specified by:
      next in interface uk.ac.starlink.table.RowSequence
      Specified by:
      next in interface uk.ac.starlink.util.Sequence
      Overrides:
      next in class uk.ac.starlink.table.WrapperRowSequence
      Throws:
      IOException
    • close

      public void close() throws IOException
      Indicates that progress is at an end. Must be called to end the progress indicator's stage.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface uk.ac.starlink.table.RowSequence
      Overrides:
      close in class uk.ac.starlink.table.WrapperRowSequence
      Throws:
      IOException