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.WrapperRowSequence
RowSequence 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 void
close()
Indicates that progress is at an end.boolean
next()
boolean
nextProgress()
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.IOException
Constructs 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.InterruptedException
Invokesnext()
and also updates the progress indicator.- Throws:
java.io.IOException
java.lang.InterruptedException
-
next
public boolean next() throws java.io.IOException
- Specified by:
next
in interfaceuk.ac.starlink.table.RowSequence
- Specified by:
next
in interfaceuk.ac.starlink.util.Sequence
- Overrides:
next
in classuk.ac.starlink.table.WrapperRowSequence
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
Indicates that progress is at an end. Must be called to end the progress indicator's stage.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceuk.ac.starlink.table.RowSequence
- Overrides:
close
in classuk.ac.starlink.table.WrapperRowSequence
- Throws:
java.io.IOException
-
-