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, wait
close, getMondrianConnection
protected Query query
protected long queryTimeout
public void start(Execution execution)
Statement
public void cancel() throws SQLException
Statement
Once 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 Statement
SQLException
- on errorpublic void end(Execution execution)
Statement
public void enableProfiling(ProfileHandler profileHandler)
Statement
Profiling information will be sent to the given writer when
Result.close()
is called.
If profileHandler is null, disables profiling.
enableProfiling
in interface Statement
profileHandler
- Writer to which to send profiling informationpublic ProfileHandler getProfileHandler()
getProfileHandler
in interface Statement
public void setQueryTimeoutMillis(long timeoutMillis)
Statement
Zero means no timeout.
Contrast with JDBC's Statement.setQueryTimeout(int)
method, which uses an int
value and a granularity of seconds.
setQueryTimeoutMillis
in interface Statement
timeoutMillis
- Timeout in millisecondspublic long getQueryTimeoutMillis()
Statement
Zero means no timeout.
Contrast with JDBC's Statement.getQueryTimeout()
method, which uses an int
value and a granularity of seconds.
getQueryTimeoutMillis
in interface Statement
public void checkCancelOrTimeout()
Statement
checkCancelOrTimeout
in interface Statement
public SchemaReader getSchemaReader()
Statement
getSchemaReader
in interface Statement
public RolapSchema getSchema()
Statement
public Object getProperty(String name)
getProperty
in interface Statement
public Execution getCurrentExecution()
Statement
getCurrentExecution
in interface Statement
Copyright © 2019 Hitachi Vantara. All rights reserved.