public class ExecutionContextImpl extends Object implements ExecutionContext
| Constructor and Description |
|---|
ExecutionContextImpl(CommandContext commandContext,
String connectorName,
String partId,
String execCount,
ConnectorWorkItem workItem) |
ExecutionContextImpl(String vdbName,
Object vdbVersion,
Serializable executionPayload,
String originalConnectionID,
String connectorName,
long requestId,
String partId,
String execCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWarning(Exception ex)
Add an exception as a warning to this Execution.
|
void |
dataAvailable()
Signal the engine that data is available and processing should be
resumed.
|
boolean |
equals(Object obj) |
int |
getBatchSize()
Return the current connector batch size.
|
CacheDirective |
getCacheDirective()
Get the
CacheDirective |
CommandContext |
getCommandContext()
Get the CommandContext
|
Serializable |
getCommandPayload()
Get the command payload
shortcut for
ExecutionContext.getCommandContext().getCommandPayload() |
String |
getConnectionId()
Get the identifier for the connection through which
the command is being executed.
|
String |
getConnectionID() |
String |
getConnectorIdentifier()
Get the identifier for the current connector running the command
|
String |
getExecutionCountIdentifier()
Execution count defines an id; where every access to the connector from
the server in a given command execution boundary is uniquely defined;
Like for example in the case of "batched execution" of commands, each execution of
command gets new identifier.
|
Serializable |
getExecutionPayload() |
String |
getGeneralHint()
Get the collection of general hints as a space concatenated string.
|
Collection<String> |
getGeneralHints()
Get the general hints.
|
String |
getPartIdentifier()
This specifies the node id for the atomic request in the relational plan of query.
|
String |
getRequestId()
Get the identifier for the command being executed.
|
String |
getRequestID() |
RuntimeMetadata |
getRuntimeMetadata() |
CacheDirective.Scope |
getScope()
Get the result cache scope for the current execution
|
Session |
getSession()
Get the current session.
|
String |
getSourceHint()
Get the collection of hints designated for this source as a space concatenated string.
|
Collection<String> |
getSourceHints()
Get the hints designated for this source.
|
Subject |
getSubject()
Get the user for the user running this query.
|
String |
getVdbName()
Get the name of the VDB this query is being run against.
|
String |
getVdbVersion()
Get the version of the VDB this query is being run against.
|
List<Exception> |
getWarnings() |
int |
hashCode() |
boolean |
isDataAvailable() |
boolean |
isTransactional()
Flag indicates that the operation needs to be executed in a XA transaction.
|
void |
keepExecutionAlive(boolean alive)
When the execution is turned on with "alive=true", the execution object will not
be implicitly closed at the end of the last batch.
|
void |
logCommand(Object... command)
Log the source command to the command log
|
void |
setBatchSize(int batchSize) |
void |
setCacheDirective(CacheDirective directive) |
void |
setGeneralHints(Collection<String> generalHint) |
void |
setHints(Collection<String> hint) |
void |
setRuntimeMetadata(RuntimeMetadataImpl queryMetadata) |
void |
setScope(CacheDirective.Scope scope)
Set the result cache scope for the current execution.
|
void |
setSession(Session session) |
String |
toString() |
public ExecutionContextImpl(String vdbName, Object vdbVersion, Serializable executionPayload, String originalConnectionID, String connectorName, long requestId, String partId, String execCount)
public ExecutionContextImpl(CommandContext commandContext, String connectorName, String partId, String execCount, ConnectorWorkItem workItem)
public CommandContext getCommandContext()
ExecutionContextgetCommandContext in interface ExecutionContextpublic String getConnectorIdentifier()
ExecutionContextgetConnectorIdentifier in interface ExecutionContextpublic String getRequestId()
ExecutionContextExecutionContext.getCommandContext().getRequestId()getRequestId in interface ExecutionContextpublic String getPartIdentifier()
ExecutionContextgetPartIdentifier in interface ExecutionContextpublic String getExecutionCountIdentifier()
ExecutionContextgetExecutionCountIdentifier in interface ExecutionContextpublic String getVdbName()
ExecutionContextExecutionContext.getCommandContext().getVdbName()getVdbName in interface ExecutionContextpublic String getVdbVersion()
ExecutionContextExecutionContext.getCommandContext().getVdbVersion()getVdbVersion in interface ExecutionContextpublic Subject getSubject()
ExecutionContextgetSubject in interface ExecutionContextpublic Serializable getCommandPayload()
ExecutionContextExecutionContext.getCommandContext().getCommandPayload()getCommandPayload in interface ExecutionContextpublic String getConnectionId()
ExecutionContextExecutionContext.getCommandContext().getConnectionId()getConnectionId in interface ExecutionContextpublic void keepExecutionAlive(boolean alive)
ExecutionContextThe engine will already detect situations when the connection should stay open for LOB (clob/blob/xml) streaming.
Keeping the execution alive unnecessarily may cause issues with connection usage as the connection instance may not be usable by other queries.
keepExecutionAlive in interface ExecutionContextpublic boolean isTransactional()
ExecutionContextisTransactional in interface ExecutionContextpublic int getBatchSize()
ExecutionContextgetBatchSize in interface ExecutionContextpublic void setBatchSize(int batchSize)
public void addWarning(Exception ex)
addWarning in interface ExecutionContextpublic Session getSession()
ExecutionContextExecutionContext.getCommandContext().getSession()getSession in interface ExecutionContextpublic void setSession(Session session)
public void dataAvailable()
ExecutionContextdataAvailable in interface ExecutionContextpublic boolean isDataAvailable()
public String getGeneralHint()
ExecutionContextgetGeneralHint in interface ExecutionContextpublic String getSourceHint()
ExecutionContextgetSourceHint in interface ExecutionContextpublic Collection<String> getGeneralHints()
ExecutionContextgetGeneralHints in interface ExecutionContextpublic Collection<String> getSourceHints()
ExecutionContextgetSourceHints in interface ExecutionContextpublic void setGeneralHints(Collection<String> generalHint)
public void setHints(Collection<String> hint)
public String getConnectionID()
getConnectionID in interface ExecutionContextpublic Serializable getExecutionPayload()
getExecutionPayload in interface ExecutionContextpublic String getRequestID()
getRequestID in interface ExecutionContextpublic CacheDirective getCacheDirective()
ExecutionContextCacheDirectivegetCacheDirective in interface ExecutionContextpublic void setCacheDirective(CacheDirective directive)
public void setRuntimeMetadata(RuntimeMetadataImpl queryMetadata)
public RuntimeMetadata getRuntimeMetadata()
getRuntimeMetadata in interface ExecutionContextRuntimeMetadatapublic void logCommand(Object... command)
ExecutionContextlogCommand in interface ExecutionContextpublic CacheDirective.Scope getScope()
ExecutionContextgetScope in interface ExecutionContextpublic void setScope(CacheDirective.Scope scope)
ExecutionContextCacheDirective.Scope.NONE will typically result in the user query result being
cached at the CacheDirective.Scope.SESSION level.setScope in interface ExecutionContextCopyright © 2018 JBoss by Red Hat. All rights reserved.