Package uk.ac.starlink.table.join
Class ProgressRowSequence
- java.lang.Object
-
- uk.ac.starlink.table.WrapperRowSequence
-
- uk.ac.starlink.table.join.ProgressRowSequence
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,uk.ac.starlink.table.RowData,uk.ac.starlink.table.RowSequence,uk.ac.starlink.util.Sequence
public class ProgressRowSequence extends uk.ac.starlink.table.WrapperRowSequenceRowSequence which logs progress to aProgressIndicator. Has to contain a couple methods extra to the RowSequence interface to make it behave properly.- Since:
- 6 Aug 2004
- Author:
- Mark Taylor (Starlink)
-
-
Constructor Summary
Constructors Constructor Description ProgressRowSequence(uk.ac.starlink.table.StarTable table, ProgressIndicator indicator, java.lang.String stage)Constructs a new ProgressRowSequence.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Indicates that progress is at an end.booleannext()booleannextProgress()Invokesnext()and also updates the progress indicator.
-
-
-
Constructor Detail
-
ProgressRowSequence
public ProgressRowSequence(uk.ac.starlink.table.StarTable table, ProgressIndicator indicator, java.lang.String stage) throws java.io.IOExceptionConstructs a new ProgressRowSequence.- Parameters:
table- table to get the base row sequence fromindicator- indicator to be informed about progressstage- string describing this stage of the process- Throws:
java.io.IOException
-
-
Method Detail
-
nextProgress
public boolean nextProgress() throws java.io.IOException, java.lang.InterruptedExceptionInvokesnext()and also updates the progress indicator.- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
next
public boolean next() throws java.io.IOException- Specified by:
nextin interfaceuk.ac.starlink.table.RowSequence- Specified by:
nextin interfaceuk.ac.starlink.util.Sequence- Overrides:
nextin classuk.ac.starlink.table.WrapperRowSequence- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionIndicates that progress is at an end. Must be called to end the progress indicator's stage.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceuk.ac.starlink.table.RowSequence- Overrides:
closein classuk.ac.starlink.table.WrapperRowSequence- Throws:
java.io.IOException
-
-