public class MultiProxyQuery extends Object implements Query
Query.nextResults(), Query.nextResultBlock(), it
gets the results from each ToolProxy and merges them into a single
List<Result>.| Constructor and Description |
|---|
MultiProxyQuery(Execution exec,
ResultHandle resultHandle)
Constructs a new instance from an Execution and a ResultHandle.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLimit()
Gets the query limit of this query.
|
String |
getResultName()
Gets the name of the underlying ResultHandle.
|
String |
getResultSelector()
Gets the selector of the underlying ResultHandle.
|
boolean |
hasNext()
Checks if there are results that have not yet been retrieved.
|
List<Result> |
nextResultBlock()
Incrementally retrieves the next chunk of results.
|
List<Result> |
nextResults()
This is a convenience method that repeatedly invokes
Query.nextResultBlock() as long as Query.hasNext() returns true. |
void |
reset()
Resets the query such that the internal result pointer offset is set to
0.
|
void |
setLimit(int limit)
Sets a limit for the maximum number of result instances that are
retrieved per invocation of
Query.nextResults() with this query. |
public MultiProxyQuery(Execution exec, ResultHandle resultHandle)
exec - the executionresultHandle - the resultHandleIllegalArgumentException - if an input parameter is null.public void reset()
QueryQuery.hasNext() and Query.nextResults()
will return results starting from the very first one, not the next result
since the last use of the Query. The limit and
queryString are not affected by the reset.public void setLimit(int limit)
QueryQuery.nextResults() with this query.public int getLimit()
Querypublic boolean hasNext()
throws at.srfg.miner.exception.MinerException
Querypublic List<Result> nextResultBlock() throws at.srfg.miner.exception.MinerException
QueryQuery.setLimit(int)) is smaller than the number of results that became
available since the last invocation of Query.nextResultBlock().nextResultBlock in interface Querylimit. If there aren't any, an empty
list is returned (but never null).at.srfg.miner.exception.MinerExceptionpublic List<Result> nextResults() throws at.srfg.miner.exception.MinerException
QueryQuery.nextResultBlock() as long as Query.hasNext() returns true. It
thus retrieves all results that became available since the last result
query, even if the number is higher than a local or server imposed
limit.
WARNING: if there are many new results at the server, this call may lead to a heap space problem!
nextResults in interface Queryat.srfg.miner.exception.MinerExceptionpublic String getResultName()
QuerygetResultName in interface Querypublic String getResultSelector()
QuerygetResultSelector in interface QueryCopyright (c) Salzburg Research Forschungsgesellschaft mbH. All rights reserved.