|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.server.Execution
public class Execution
Execution context.
Loosely corresponds to a CellSet. A given statement may be executed several times over its lifetime, but at most one execution can be going on at a time.
| Nested Class Summary | |
|---|---|
static class |
Execution.State
Enumeration of the states of an Execution instance. |
| Field Summary | |
|---|---|
static Execution |
NONE
|
(package private) StatementImpl |
statement
|
| Constructor Summary | |
|---|---|
Execution(Statement statement,
long timeoutIntervalMillis)
|
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels the execution instance. |
void |
cancelSqlStatements()
Called by the RolapResultShepherd when the execution needs to clean all of its resources for whatever reasons, typically when an exception has occurred or the execution has ended. |
void |
checkCancelOrTimeout()
Checks the state of this Execution and throws an exception if something is wrong. |
void |
copyMDC()
Copy the current MDC so it can be used later |
void |
end()
Called when query execution has completed. |
long |
getElapsedMillis()
|
long |
getId()
|
Statement |
getMondrianStatement()
|
QueryTiming |
getQueryTiming()
|
long |
getStartTime()
|
boolean |
isCancelOrTimeout()
Returns whether this execution is currently in a failed state and will throw an exception as soon as the next check is performed using checkCancelOrTimeout(). |
void |
registerStatement(Locus locus,
Statement statement)
This method is typically called by SqlStatement at construction time. |
void |
setContextMap()
Set the copied mdc into the current MDC. |
void |
setOutOfMemory(String msg)
This method will change the state of this execution to Execution.State.ERROR and will set the message to display. |
void |
start()
Marks the start of an Execution instance. |
void |
tracePhase(int hitCount,
int missCount,
int pendingCount)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
final StatementImpl statement
public static final Execution NONE
| Constructor Detail |
|---|
public Execution(Statement statement,
long timeoutIntervalMillis)
| Method Detail |
|---|
public void copyMDC()
public void setContextMap()
public void start()
Statement.start(Execution) automatically. Users don't
need to call this method.
public void tracePhase(int hitCount,
int missCount,
int pendingCount)
public void cancel()
public final void setOutOfMemory(String msg)
Execution.State.ERROR and will set the message to display.
Cleanup of the resources used by this execution instance
will be performed in the background later on.
msg - The message to display to the user, describing
the problem encountered with the memory space.
public void checkCancelOrTimeout()
throws MondrianException
It won't throw anything if the query has successfully completed.
MondrianException - The exception encountered.public boolean isCancelOrTimeout()
checkCancelOrTimeout().
public void cancelSqlStatements()
isCancelOrTimeout() returns true.
This method doesn't need to be called by a user. It will be called internally by Mondrian when the system is ready to clean the remaining resources.
To check if this execution is failed, use
isCancelOrTimeout() instead.
public void end()
public final long getStartTime()
public final Statement getMondrianStatement()
public final QueryTiming getQueryTiming()
public final long getId()
public final long getElapsedMillis()
public void registerStatement(Locus locus,
Statement statement)
statement - The statement used by this execution.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||