| Modifier and Type | Field and Description |
|---|---|
protected Query |
query |
protected long |
queryTimeout
Query timeout, in milliseconds
|
| Constructor and Description |
|---|
StatementImpl()
Creates a StatementImpl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Issues a cancel request on this statement.
|
void |
checkCancelOrTimeout()
Checks if either a cancel request has been issued on the query or
the execution time has exceeded the timeout value (if one has been
set).
|
void |
enableProfiling(ProfileHandler profileHandler)
Enables profiling.
|
void |
end(Execution execution)
Ends the current execution.
|
Execution |
getCurrentExecution()
Returns execution context if currently executing, null otherwise.
|
long |
getId()
Returns the ID of this statement, unique within the JVM.
|
ProfileHandler |
getProfileHandler() |
Object |
getProperty(String name) |
Query |
getQuery() |
long |
getQueryTimeoutMillis()
Returns the query timeout of this statement, in milliseconds.
|
RolapSchema |
getSchema()
Returns this statement's schema.
|
SchemaReader |
getSchemaReader()
Returns this statement's schema reader.
|
void |
setQuery(Query query) |
void |
setQueryTimeoutMillis(long timeoutMillis)
Sets the timeout of this statement, in milliseconds.
|
void |
start(Execution execution)
Starts an execution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getMondrianConnectionprotected Query query
protected long queryTimeout
public void start(Execution execution)
Statementpublic void cancel()
throws SQLException
StatementOnce the thread running the statement detects the cancel request,
execution will throw an exception. See
BasicQueryTest.testCancel for an example of usage of this
method.
cancel in interface StatementSQLException - on errorpublic void end(Execution execution)
Statementpublic void enableProfiling(ProfileHandler profileHandler)
StatementProfiling information will be sent to the given writer when
Result.close() is called.
If profileHandler is null, disables profiling.
enableProfiling in interface StatementprofileHandler - Writer to which to send profiling informationpublic ProfileHandler getProfileHandler()
getProfileHandler in interface Statementpublic void setQueryTimeoutMillis(long timeoutMillis)
StatementZero means no timeout.
Contrast with JDBC's Statement.setQueryTimeout(int)
method, which uses an int value and a granularity of seconds.
setQueryTimeoutMillis in interface StatementtimeoutMillis - Timeout in millisecondspublic long getQueryTimeoutMillis()
StatementZero means no timeout.
Contrast with JDBC's Statement.getQueryTimeout()
method, which uses an int value and a granularity of seconds.
getQueryTimeoutMillis in interface Statementpublic void checkCancelOrTimeout()
StatementcheckCancelOrTimeout in interface Statementpublic SchemaReader getSchemaReader()
StatementgetSchemaReader in interface Statementpublic RolapSchema getSchema()
Statementpublic Object getProperty(String name)
getProperty in interface Statementpublic Execution getCurrentExecution()
StatementgetCurrentExecution in interface StatementCopyright © 2020 Hitachi Vantara. All rights reserved.