|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.server.StatementImpl
public abstract class StatementImpl
Implementation of Statement.
Not part of Mondrian's public API. This class may change without notice.
| Field Summary | |
|---|---|
protected Query |
query
|
protected long |
queryTimeout
Query timeout, in milliseconds |
| Constructor Summary | |
|---|---|
StatementImpl()
Creates a StatementImpl. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface mondrian.server.Statement |
|---|
close, getMondrianConnection |
| Field Detail |
|---|
protected Query query
protected long queryTimeout
| Constructor Detail |
|---|
public StatementImpl()
| Method Detail |
|---|
public void start(Execution execution)
Statement
start in interface Statementexecution - Execution context
public 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)
Statement
end in interface Statementexecution - Execution; must match the execution that was startedpublic 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()
Statement
checkCancelOrTimeout in interface Statementpublic SchemaReader getSchemaReader()
Statement
getSchemaReader in interface Statementpublic RolapSchema getSchema()
Statement
getSchema in interface Statementpublic Object getProperty(String name)
getProperty in interface Statementpublic Query getQuery()
getQuery in interface Statementpublic void setQuery(Query query)
setQuery in interface Statementpublic Execution getCurrentExecution()
Statement
getCurrentExecution in interface Statementpublic long getId()
Statement
getId in interface Statement
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||