Constructor and Description |
---|
SingleProxyQuery(Execution exec,
ResultHandle handle)
Constructs a new instance from an execution and a resultHandle.
|
SingleProxyQuery(Execution exec,
ResultHandle handle,
Proxy proxy)
Constructs a new instance.
|
SingleProxyQuery(Execution exec,
ResultHandle handle,
String queryString)
Constructs a new instance from an execution, a resultHandle, and a
queryString.
|
SingleProxyQuery(int execId,
int scenarioId,
int taskId,
int actionId,
int handleId,
String resultName,
String resultSelector,
String datatype,
String savePattern,
Proxy proxy,
String queryString)
Constructs a new instance from the given identifiers and strings.
|
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 SingleProxyQuery(Execution exec, ResultHandle handle)
handle
is not associated with exactly
1 proxy from which results have to be queried, see
Action.addProxy(String)
and
ResultHandle.setQueryProxies(Proxy...)
.exec
- the executionhandle
- the resultHandleIllegalStateException
- if the resultHandle does not have exactly 1 proxy whose
results have to be retrieved.public SingleProxyQuery(Execution exec, ResultHandle handle, String queryString)
handle
is not
associated with exactly 1 proxy from which results have to be queried,
see Action.addProxy(String)
and
ResultHandle.setQueryProxies(Proxy...)
.exec
- the executionhandle
- the resultHandlequeryString
- the queryStringIllegalStateException
- if the resultHandle does not have exactly 1 proxy whose
results have to be retrieved.public SingleProxyQuery(Execution exec, ResultHandle handle, Proxy proxy)
proxy
Other proxies that may
be associated with handle
are not considered.exec
- the executionhandle
- the resultHandleproxy
- the proxy whose results have to be queriedpublic SingleProxyQuery(int execId, int scenarioId, int taskId, int actionId, int handleId, String resultName, String resultSelector, String datatype, String savePattern, Proxy proxy, String queryString)
execId
- the execution IdscenarioId
- the scenario IdtaskId
- the task IdactionId
- the action IdhandleId
- the resulthandle IdresultName
- the result nameresultSelector
- the result selectordatatype
- the result typesavePattern
- for pattern for saving binary resultsproxy
- the proxy whose results will be queriedqueryString
- the queryStringpublic void setLimit(int limit)
Query
Query.nextResults()
with this query.public int getLimit()
Query
public boolean hasNext() throws at.srfg.miner.exception.MinerException
This implementation doesn't necessarily make a query at the server. The
query is skipped if it is known from the previous invocation of
getResults
that more results are available.
public List<Result> nextResults() throws at.srfg.miner.exception.MinerException
Query
Query.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 Query
at.srfg.miner.exception.MinerException
public List<Result> nextResultBlock() throws at.srfg.miner.exception.MinerException
Query
Query.setLimit(int)
) is smaller than the number of results that became
available since the last invocation of Query.nextResultBlock()
.nextResultBlock
in interface Query
limit
. If there aren't any, an empty
list is returned (but never null).at.srfg.miner.exception.MinerException
public void reset()
Query
Query.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 String getResultName()
Query
getResultName
in interface Query
public String getResultSelector()
Query
getResultSelector
in interface Query
Copyright (c) Salzburg Research Forschungsgesellschaft mbH. All rights reserved.