public class CountDataStore extends Object implements uk.ac.starlink.ttools.plot2.data.DataStore
The intention is that an operation involving data access can be
run using this data store to find out how many tuples in total
would be read by the operation. In order to run quickly however,
this implementation does not supply all those rows, it truncates
the number of tuples dispensed per sequence to a given (small) number.
When the operation is complete, the getTupleCount()
method
can be called.
Constructor and Description |
---|
CountDataStore(uk.ac.starlink.ttools.plot2.data.DataStore base,
int maxCount)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getTupleCount()
Returns the total number of tuples represented by the tuple sequences
dispensed by this data store since construction time.
|
uk.ac.starlink.ttools.plot2.data.TupleRunner |
getTupleRunner() |
uk.ac.starlink.ttools.plot2.data.TupleSequence |
getTupleSequence(uk.ac.starlink.ttools.plot2.data.DataSpec spec) |
boolean |
hasData(uk.ac.starlink.ttools.plot2.data.DataSpec spec) |
public CountDataStore(uk.ac.starlink.ttools.plot2.data.DataStore base, int maxCount)
base
- base data store to which most operations are delegatedmaxCount
- maximum number of tuples actually dispensed
from tuplesequences acquired from this storepublic boolean hasData(uk.ac.starlink.ttools.plot2.data.DataSpec spec)
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 spec)
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
public long getTupleCount()
Copyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.