|
GemFire 6.5.1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Query
Interface for query objects. Supports execution of queries with optional parameters.
| Method Summary | |
|---|---|
void |
compile()
Deprecated. as of 6.5 |
Object |
execute()
Execute this query and returns an object that represent its result. |
Object |
execute(Object[] params)
Executes this query with the given parameters and returns an object that represent its result. |
String |
getQueryString()
Return the original query string that was specified in the constructor. |
QueryStatistics |
getStatistics()
Get statistics information for this query. |
boolean |
isCompiled()
Deprecated. as of 6.5 |
| Method Detail |
|---|
String getQueryString()
Object execute()
throws FunctionDomainException,
TypeMismatchException,
NameResolutionException,
QueryInvocationTargetException
Integer,
etc.) is returned. If the query resolves to more than one
object, a SelectResults is returned.
Query execution can potentially take a long time depending on
data size and query complexity. The system property
"gemfire.Cache.MAX_QUERY_EXECUTION_TIME" can be set to define the
maximum time allowed for a query to complete its execution. If query
execution time exceeds "gemfire.Cache.MAX_QUERY_EXECUTION_TIME",
then the query is canceled and QueryExecutionTimeoutException is
thrown back to the caller, if the execution is local to the VM.
If the canceled query was initiated by a GemFire client, then a
QueryException is thrown on the client with its cause set to
QueryExecutionTimeoutException. This timeout does not account for
the time taken to construct the results after execution completes
and the results returned to the caller.
SelectResults. However, since a query is not
necessarily just a select statement, the return type of this
method is Object.
For example, the query (select distinct * from /rgn).size
returns an instance of java.lang.Integer.
FunctionDomainException - A function was applied to a parameter that is improper
for that function. For example, the ELEMENT function
was applied to a collection of more than one element
TypeMismatchException - If a bound parameter is not of the expected type.
NameResolutionException - If a name in the query cannot be resolved.
IllegalArgumentException - The number of bound parameters does not match the number
of placeholders
IllegalStateException - If the query is not permitted on this type of region
QueryExecutionTimeoutException - If the query gets canceled due to setting system variable
"gemfire.Cache.MAX_QUERY_EXECUTION_TIME". This is a thrown when
query is executed on the local regions (embedded mode).
QueryInvocationTargetException
Object execute(Object[] params)
throws FunctionDomainException,
TypeMismatchException,
NameResolutionException,
QueryInvocationTargetException
Integer, etc.) is returned. If the query
resolves to more than one object, a SelectResults is
returned.
Query execution can potentially take a long time depending on
data size and query complexity. The system property
"gemfire.Cache.MAX_QUERY_EXECUTION_TIME" can be set to define the
maximum time allowed for a query to complete its execution. If query
execution time exceeds "gemfire.Cache.MAX_QUERY_EXECUTION_TIME",
then the query is canceled and QueryExecutionTimeoutException is
thrown back to the caller, if the execution is local to the VM.
If the canceled query was initiated by a GemFire client, then a
QueryException is thrown on the client with its cause set to
QueryExecutionTimeoutException. This timeout does not account for
the time taken to construct the results after execution completes
and the results returned to the caller.
params - Values that are bound to parameters (such as
$1) in this query.
SelectResults. However, since a query is not
necessarily just a select statement, the return type of this
method is Object.
For example, the query (select distinct * from /rgn).size
returns an instance of java.lang.Integer.
FunctionDomainException - A function was applied to a parameter that is improper
for that function. For example, the ELEMENT function
was applied to a collection of more than one element
TypeMismatchException - If a bound parameter is not of the expected type.
NameResolutionException - If a name in the query cannot be resolved.
IllegalArgumentException - The number of bound parameters does not match the number
of placeholders
IllegalStateException - If the query is not permitted on this type of region
QueryExecutionTimeoutException - If the query gets canceled due to setting system variable
"gemfire.Cache.MAX_QUERY_EXECUTION_TIME". This is a thrown when
query is executed on the local regions (embedded mode).
QueryInvocationTargetException
@Deprecated
void compile()
throws TypeMismatchException,
NameResolutionException
Query to achieve higher performance
execution.
TypeMismatchException - If the compile-time type of a name, parameter, or
expression is not the expected type
QueryInvalidException - The syntax of the query string is not correct
NameResolutionException@Deprecated boolean isCompiled()
true if this query has been compiled into bytecodesQueryStatistics getStatistics()
|
GemFire 6.5.1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||