mondrian.rolap
Class RolapResultShepherd
java.lang.Object
mondrian.rolap.RolapResultShepherd
public class RolapResultShepherd
- extends Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RolapResultShepherd
public RolapResultShepherd()
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 exceeded
QueryCanceledException - if query was canceled during execution
QueryTimeoutException - if query exceeded timeout specified in
the property file
shutdown
public void shutdown()