public class ParallelResultRowSequence extends Object implements ConeResultRowSequence
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAXPAR
Default maximum value for the number of threads that should be
permitted for a query.
|
static String |
MAXPAR_PROP
Name of system property "service.maxparallel" which may be used to adjust the
maximum parallelism.
|
| Constructor and Description |
|---|
ParallelResultRowSequence(ConeQueryRowSequence querySeq,
ConeSearcher coneSearcher,
ConeErrorPolicy errAct,
Coverage coverage,
boolean bestOnly,
boolean distFilter,
String distanceCol,
int parallelism)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Indicates that this sequence will not be required any more.
|
Object |
getCell(int icol)
Returns the contents of a cell in the current row.
|
StarTable |
getConeResult()
Returns the result of the cone search for the current row of this
sequence.
|
double |
getDec()
Get central declination for the current row's cone search request
in degrees.
|
long |
getIndex()
Get the index in the underlying table to which the current row relates.
|
static int |
getMaxParallelism()
Returns the maximum parallelism value which should permitted in this JVM.
|
double |
getRa()
Get central right ascension for the current row's cone search request
in degrees.
|
double |
getRadius()
Get search radius for the current row's cone search request
in degrees.
|
Object[] |
getRow()
Returns the contents of the current table row, as an array
with the same number of elements as there are columns in this
table.
|
boolean |
next()
Attempts to advance the current row to the next one.
|
public static final int DEFAULT_MAXPAR
MAXPAR_PROP,
getMaxParallelism(),
Constant Field Valuespublic static final String MAXPAR_PROP
DEFAULT_MAXPAR,
getMaxParallelism(),
Constant Field Valuespublic ParallelResultRowSequence(ConeQueryRowSequence querySeq, ConeSearcher coneSearcher, ConeErrorPolicy errAct, Coverage coverage, boolean bestOnly, boolean distFilter, String distanceCol, int parallelism)
querySeq - sequence providing cone search query parametersconeSearcher - cone search implementationerrAct - defines action on cone search invocation errorcoverage - coverage for results, or nullbestOnly - whether all results or just best are requireddistFilter - true to perform post-query filtering on results
based on the distance between the query position
and the result row positiondistanceCol - name of column to hold distance information
in output table, or nullparallelism - number of concurrent querying threadspublic boolean next()
throws IOException
RowSequencetrue is returned the attempt has been successful,
and if false is returned there are no more rows in this
sequence.
Since the initial position of a RowSequence is before the first row,
this method must be called before current row data
can be accessed using the
RowSequence.getCell(int) or RowSequence.getRow() methods.next in interface RowSequencenext in interface Sequencetrue iff this sequence has been advanced to the
next rowIOException - if there is some errorpublic Object getCell(int icol) throws IOException
RowSequencegetColumnInfo(icol).getContentClass().
An unchecked exception will be thrown if there is no current
row (next has not yet been called).getCell in interface RowDatagetCell in interface RowSequenceicol - column indexicol in the current rowIOException - if there is an error reading the datapublic Object[] getRow() throws IOException
RowSequencenext has not yet been called).getRow in interface RowDatagetRow in interface RowSequenceirowIOException - if there is an error reading the datapublic double getRa()
throws IOException
ConeQueryRowSequencegetRa in interface ConeQueryRowSequenceIOExceptionpublic double getDec()
throws IOException
ConeQueryRowSequencegetDec in interface ConeQueryRowSequenceIOExceptionpublic double getRadius()
throws IOException
ConeQueryRowSequencegetRadius in interface ConeQueryRowSequenceIOExceptionpublic long getIndex()
throws IOException
ConeQueryRowSequencenext.getIndex in interface ConeQueryRowSequenceIOExceptionpublic StarTable getConeResult() throws IOException
ConeResultRowSequenceConeMatcher.getConeResult(uk.ac.starlink.ttools.cone.ConeSearcher, uk.ac.starlink.ttools.cone.ConeErrorPolicy, boolean, boolean, java.lang.String, double, double, double).
If no records in the cone are found, the return value may either be null or (preferably) an empty table with the correct columns.
getConeResult in interface ConeResultRowSequenceIOExceptionpublic void close()
throws IOException
RowSequenceclose is undefined.close in interface Closeableclose in interface AutoCloseableclose in interface RowSequenceIOExceptionpublic static int getMaxParallelism()
MAXPAR_PROP system
property.
Note that this method is not used by this class, i.e. the maximum
is not imposed here, it should be imposed by calling code.Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.