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()
ExecutionContext
getCommandContext
in interface ExecutionContext
public String getConnectorIdentifier()
ExecutionContext
getConnectorIdentifier
in interface ExecutionContext
public String getRequestId()
ExecutionContext
ExecutionContext.getCommandContext()
.getRequestId()getRequestId
in interface ExecutionContext
public String getPartIdentifier()
ExecutionContext
getPartIdentifier
in interface ExecutionContext
public String getExecutionCountIdentifier()
ExecutionContext
getExecutionCountIdentifier
in interface ExecutionContext
public String getVdbName()
ExecutionContext
ExecutionContext.getCommandContext()
.getVdbName()getVdbName
in interface ExecutionContext
public String getVdbVersion()
ExecutionContext
ExecutionContext.getCommandContext()
.getVdbVersion()getVdbVersion
in interface ExecutionContext
public Subject getSubject()
ExecutionContext
getSubject
in interface ExecutionContext
public Serializable getCommandPayload()
ExecutionContext
ExecutionContext.getCommandContext()
.getCommandPayload()getCommandPayload
in interface ExecutionContext
public String getConnectionId()
ExecutionContext
ExecutionContext.getCommandContext()
.getConnectionId()getConnectionId
in interface ExecutionContext
public void keepExecutionAlive(boolean alive)
ExecutionContext
The 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 ExecutionContext
public boolean isTransactional()
ExecutionContext
isTransactional
in interface ExecutionContext
public int getBatchSize()
ExecutionContext
getBatchSize
in interface ExecutionContext
public void setBatchSize(int batchSize)
public void addWarning(Exception ex)
addWarning
in interface ExecutionContext
public Session getSession()
ExecutionContext
ExecutionContext.getCommandContext()
.getSession()getSession
in interface ExecutionContext
public void setSession(Session session)
public void dataAvailable()
ExecutionContext
dataAvailable
in interface ExecutionContext
public boolean isDataAvailable()
public String getGeneralHint()
ExecutionContext
getGeneralHint
in interface ExecutionContext
public String getSourceHint()
ExecutionContext
getSourceHint
in interface ExecutionContext
public Collection<String> getGeneralHints()
ExecutionContext
getGeneralHints
in interface ExecutionContext
public Collection<String> getSourceHints()
ExecutionContext
getSourceHints
in interface ExecutionContext
public void setGeneralHints(Collection<String> generalHint)
public void setHints(Collection<String> hint)
public String getConnectionID()
getConnectionID
in interface ExecutionContext
public Serializable getExecutionPayload()
getExecutionPayload
in interface ExecutionContext
public String getRequestID()
getRequestID
in interface ExecutionContext
public CacheDirective getCacheDirective()
ExecutionContext
CacheDirective
getCacheDirective
in interface ExecutionContext
public void setCacheDirective(CacheDirective directive)
public void setRuntimeMetadata(RuntimeMetadataImpl queryMetadata)
public RuntimeMetadata getRuntimeMetadata()
getRuntimeMetadata
in interface ExecutionContext
RuntimeMetadata
public void logCommand(Object... command)
ExecutionContext
logCommand
in interface ExecutionContext
public CacheDirective.Scope getScope()
ExecutionContext
getScope
in interface ExecutionContext
public void setScope(CacheDirective.Scope scope)
ExecutionContext
CacheDirective.Scope.NONE
will typically result in the user query result being
cached at the CacheDirective.Scope.SESSION
level.setScope
in interface ExecutionContext
Copyright © 2017 JBoss by Red Hat. All rights reserved.