|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.cone.ParallelResultRowSequence
public class ParallelResultRowSequence
ConeResultRowSequence implementation which uses a fixed number of worker threads to dispatch cone queries in parallel. The result table has the same ordering as if they had been done in sequence.
Field Summary | |
---|---|
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 Summary | |
---|---|
ParallelResultRowSequence(ConeQueryRowSequence querySeq,
ConeSearcher coneSearcher,
ConeErrorPolicy errAct,
Coverage coverage,
boolean bestOnly,
boolean distFilter,
String distanceCol,
int parallelism)
Constructor. |
Method Summary | |
---|---|
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 advances the current row to the next one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_MAXPAR
MAXPAR_PROP
,
getMaxParallelism()
,
Constant Field Valuespublic static final String MAXPAR_PROP
DEFAULT_MAXPAR
,
getMaxParallelism()
,
Constant Field ValuesConstructor Detail |
---|
public 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 threadsMethod Detail |
---|
public boolean next() throws IOException
RowSequence
RowSequence.getCell(int)
or RowSequence.getRow()
methods.
next
in interface RowSequence
IOException
- if there is some errorpublic Object getCell(int icol) throws IOException
RowSequence
getCell
in interface RowSequence
IOException
- if there is an error reading the datapublic Object[] getRow() throws IOException
RowSequence
getRow
in interface RowSequence
IOException
- if there is an error reading the datapublic double getRa() throws IOException
ConeQueryRowSequence
getRa
in interface ConeQueryRowSequence
IOException
public double getDec() throws IOException
ConeQueryRowSequence
getDec
in interface ConeQueryRowSequence
IOException
public double getRadius() throws IOException
ConeQueryRowSequence
getRadius
in interface ConeQueryRowSequence
IOException
public long getIndex() throws IOException
ConeQueryRowSequence
next
.
getIndex
in interface ConeQueryRowSequence
IOException
public StarTable getConeResult() throws IOException
ConeResultRowSequence
ConeMatcher.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 ConeResultRowSequence
IOException
public void close() throws IOException
RowSequence
close
is undefined.
close
in interface RowSequence
IOException
public 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |