|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FarragoSessionRuntimeContext
FarragoSessionRuntimeContext defines runtime support routines needed by generated code.
Method Summary | |
---|---|
void |
cancel()
Requests cancellation of this execution (either for asynchronous abort, or because execution has ended). |
void |
checkCancel()
Throws an exception if execution has been canceled. |
void |
detachMdrSession()
Detaches the current MDR session from the running thread. |
FennelStreamGraph |
getFennelStreamGraph()
|
FarragoRepos |
getRepos()
|
RelDataType |
getRowTypeForResultSet(String resultSetName)
Gets the row type for instantiating a result set. |
FarragoSession |
getSession()
|
FennelStreamHandle |
getStreamHandle(String globalStreamName,
boolean isInput)
Retrieves the FennelStreamHandle corresponding to a stream |
FarragoWarningQueue |
getWarningQueue()
|
RuntimeException |
handleRoutineInvocationException(Throwable ex,
String methodName)
Handles an exception caught by invocation of a routine. |
void |
loadFennelPlan(String xmiFennelPlan)
Loads the Fennel portion of an execution plan (either creating a new XO graph or reusing a cached instance). |
void |
openStreams()
Opens all streams, including the Fennel portion of the execution plan. |
void |
popRoutineInvocation()
Pops a routine invocation from the context stack. |
void |
pushRoutineInvocation(FarragoSessionUdrContext udrContext,
boolean allowSql)
Pushes a routine invocation onto the context stack. |
void |
reattachMdrSession()
Re-attaches a detached MDR session to the currently running thread, if any was previously detached. |
void |
setCursorState(boolean active)
Sets the state of the top-level cursor associated with this context. |
void |
setExecutionHandle(FennelExecutionHandle execHandle)
Associates an execution handle with the runtime context. |
void |
setStatementClassLoader(ClassLoader classLoader)
Configures a custom class loader used to load extra classes that may be needed during statement runtime. |
void |
waitForCursor()
Waits for cursor state to be reset to active=false (returns immediately if cursor is not currently active). |
Methods inherited from interface org.eigenbase.util.ClosableAllocationOwner |
---|
addAllocation |
Methods inherited from interface org.eigenbase.util.ClosableAllocation |
---|
closeAllocation |
Methods inherited from interface org.eigenbase.util.ClosableAllocation |
---|
closeAllocation |
Method Detail |
---|
void loadFennelPlan(String xmiFennelPlan)
xmiFennelPlan
- XMI representation of plan definitionvoid openStreams()
void cancel()
void checkCancel()
void setExecutionHandle(FennelExecutionHandle execHandle)
execHandle
- the execution handlevoid setCursorState(boolean active)
checkCancel()
is called both before the fetch request
(active=true) and after the fetch (active=false). Not called for internal
cursors such as UDX inputs and cursors opened via reentrant SQL from
UDRs.
active
- true if cursor is beginning a fetch request; false if
cursor is ending a fetch requestvoid waitForCursor()
FennelStreamGraph getFennelStreamGraph()
FennelStreamHandle getStreamHandle(String globalStreamName, boolean isInput)
globalStreamName
- name of the stream that you are searching forisInput
-
void pushRoutineInvocation(FarragoSessionUdrContext udrContext, boolean allowSql)
udrContext
- context holder for routine invocation instance within
statement being executedallowSql
- whether SQL execution should be allowed in this routinevoid popRoutineInvocation()
RuntimeException handleRoutineInvocationException(Throwable ex, String methodName)
ex
- exceptionmethodName
- name of external Java method
void setStatementClassLoader(ClassLoader classLoader)
RelDataType getRowTypeForResultSet(String resultSetName)
resultSetName
- name of result set stored by optimizer
FarragoSession getSession()
FarragoRepos getRepos()
void detachMdrSession()
void reattachMdrSession()
FarragoWarningQueue getWarningQueue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |