public class GuiDataStore extends Object implements uk.ac.starlink.ttools.plot2.data.DataStore
First, it checks for thread interruptions regularly, and stops dispensing tuples from the data store if in case of interruption. The thread interruption status is undisturbed, and clients should in general check the interuption status of the thread following use of an instance of this class.
Second, it optionally updates a progress bar as tuples are read. For this to work, it needs to know up front (at least a guess for) how many tuples will be read in total over the lifetime of the store.
Constructor and Description |
---|
GuiDataStore(uk.ac.starlink.ttools.plot2.data.DataStore base)
Constructs a data store that checks for interruptions.
|
GuiDataStore(uk.ac.starlink.ttools.plot2.data.DataStore base,
BoundedRangeModel progModel,
long tupleCount)
Constructs a data store that checks for interruptions and optionally
reports progress.
|
Modifier and Type | Method and Description |
---|---|
uk.ac.starlink.ttools.plot2.data.TupleRunner |
getTupleRunner() |
uk.ac.starlink.ttools.plot2.data.TupleSequence |
getTupleSequence(uk.ac.starlink.ttools.plot2.data.DataSpec dataSpec) |
boolean |
hasData(uk.ac.starlink.ttools.plot2.data.DataSpec dataSpec) |
public GuiDataStore(uk.ac.starlink.ttools.plot2.data.DataStore base)
base
- data store to which most behaviour will be delegatedpublic GuiDataStore(uk.ac.starlink.ttools.plot2.data.DataStore base, BoundedRangeModel progModel, long tupleCount)
progBar
is null or tupleCount
is negative,
there will be no progress updating, but the interruption handling
will still take place.base
- base data store to which most behaviour is delegatedprogModel
- progress bar model, or nulltupleCount
- total number of tuples expected to be read
during the life of this data store;
-1 may be supplied if not knownpublic boolean hasData(uk.ac.starlink.ttools.plot2.data.DataSpec dataSpec)
hasData
in interface uk.ac.starlink.ttools.plot2.data.DataStore
public uk.ac.starlink.ttools.plot2.data.TupleSequence getTupleSequence(uk.ac.starlink.ttools.plot2.data.DataSpec dataSpec)
getTupleSequence
in interface uk.ac.starlink.ttools.plot2.data.DataStore
public uk.ac.starlink.ttools.plot2.data.TupleRunner getTupleRunner()
getTupleRunner
in interface uk.ac.starlink.ttools.plot2.data.DataStore
Copyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.