public class TableCachedData extends Object
Constructor and Description |
---|
TableCachedData(long nrow,
List<java.util.function.Supplier<CachedReader>> maskCols,
List<java.util.function.Supplier<CachedReader>> coordCols)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<java.util.function.Supplier<CachedReader>> |
getCoordColumns()
Returns a list of objects supplying coordinate data.
|
List<java.util.function.Supplier<CachedReader>> |
getMaskColumns()
Returns a list of objects supplying mask data.
|
long |
getRowCount()
Returns the row count for this object's table.
|
static TableCachedData |
readDataPar(StarTable table,
MaskSpec[] maskSpecs,
CoordSpec[] coordSpecs,
CachedColumnFactory colFact,
RowRunner rowRunner)
Populates and returns a TableCachedData instance by reading
from a given table in a parallel fashion.
|
static TableCachedData |
readDataSeq(StarTable table,
MaskSpec[] maskSpecs,
CoordSpec[] coordSpecs,
CachedColumnFactory colFact)
Populates and returns a TableCachedData instance by reading
from a given table in a sequential fashion.
|
public TableCachedData(long nrow, List<java.util.function.Supplier<CachedReader>> maskCols, List<java.util.function.Supplier<CachedReader>> coordCols)
nrow
- number of rows available from readersmaskCols
- list of mask column reader supplierscoordCols
- list of coordinate column reader supplierspublic long getRowCount()
public List<java.util.function.Supplier<CachedReader>> getMaskColumns()
public List<java.util.function.Supplier<CachedReader>> getCoordColumns()
@Slow public static TableCachedData readDataSeq(StarTable table, MaskSpec[] maskSpecs, CoordSpec[] coordSpecs, CachedColumnFactory colFact) throws IOException, InterruptedException
table
- input tablemaskSpecs
- mask specifications relating to tablecoordSpecs
- coord specifications relating to tablecolFact
- creates storageIOException
InterruptedException
@Slow public static TableCachedData readDataPar(StarTable table, MaskSpec[] maskSpecs, CoordSpec[] coordSpecs, CachedColumnFactory colFact, RowRunner rowRunner) throws IOException
Use with care: The ordering of the elements in the result is not guaranteed to be the same as the input iteration ordering. Also, the returned object is less efficient for iteration than that returned by the sequential implementation.
table
- input tablemaskSpecs
- mask specifications relating to tablecoordSpecs
- coord specifications relating to tablecolFact
- creates storagerowRunner
- row runnerIOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.