Package mondrian.rolap
Class RolapResultShepherd
java.lang.Object
mondrian.rolap.RolapResultShepherd
A utility class for
RolapConnection
. It specializes in
shepherding the creation of RolapResult by running the actual execution
on a separate thread from the user thread so we can:
- Monitor all executions for timeouts and resource limits as they run in the background
- Bubble exceptions to the user thread as fast as they happen.
- Gracefully cancel all SQL statements and cleanup in the background.
- Author:
- LBoudreau
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
RolapResultShepherd
public RolapResultShepherd()
-
-
Method Details
-
shepherdExecution
Executes and shepherds the execution of an Execution instance. The shepherd will wrap the Execution instance into a Future object which can be monitored for exceptions. If any are encountered, two things will happen. First, the user thread will be returned and the resulting exception will bubble up. Second, the execution thread will attempt to do a graceful stop of all running SQL statements and release all other resources gracefully in the background.- Parameters:
execution
- An Execution instance.callable
- A callable to monitor returning a Result instance.- Returns:
- A Result object, as supplied by the Callable passed as a parameter.
- Throws:
ResourceLimitExceededException
- if some resource limit specified in the property file was exceededQueryCanceledException
- if query was canceled during executionQueryTimeoutException
- if query exceeded timeout specified in the property file
-
shutdown
public void shutdown()
-