Package mondrian.rolap
Class RolapResultShepherd
- java.lang.Object
-
- mondrian.rolap.RolapResultShepherd
-
public class RolapResultShepherd extends Object
A utility class forRolapConnection
. 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
Constructors Constructor Description RolapResultShepherd()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Result
shepherdExecution(Execution execution, Callable<Result> callable)
Executes and shepherds the execution of an Execution instance.void
shutdown()
-
-
-
Method Detail
-
shepherdExecution
public Result shepherdExecution(Execution execution, Callable<Result> callable)
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()
-
-