org.teiid.translator
Interface ExecutionContext


public interface ExecutionContext

The security context provides information about the user context in which this query is being run. As of 4.2, the SecurityContext is a sub-interface of ExecutionContext such that both interfaces contain all of the methods from the prior independent interfaces. Thus, these interfaces can now be used interchangeably.


Method Summary
 void addWarning(java.lang.Exception ex)
          Add an exception as a warning to this Execution.
 int getBatchSize()
          Return the current connector batch size.
 java.lang.String getConnectionIdentifier()
          Get the identifier for the connection through which the command is being executed.
 java.lang.String getConnectorIdentifier()
          Get the identifier for the current connector running the command
 java.lang.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.
 java.io.Serializable getExecutionPayload()
          Get the trusted payload passed when the user statement was executed.
 java.lang.String getPartIdentifier()
          This specifies the node id for the atomic request in the relational plan of query.
 java.lang.String getRequestIdentifier()
          Get the identifier for the command being executed.
 javax.security.auth.Subject getSubject()
          Get the user for the user running this query.
 java.lang.String getVirtualDatabaseName()
          Get the name of the VDB this query is being run against.
 int getVirtualDatabaseVersion()
          Get the version of the VDB this query is being run against.
 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.
 

Method Detail

getConnectorIdentifier

java.lang.String getConnectorIdentifier()
Get the identifier for the current connector running the command

Returns:
Connector identifier; never null

getRequestIdentifier

java.lang.String getRequestIdentifier()
Get the identifier for the command being executed. This can be correlated back to identifiers exposed in other parts of the system.

Returns:
command identifier

getPartIdentifier

java.lang.String getPartIdentifier()
This specifies the node id for the atomic request in the relational plan of query. when combined with the request identifier, uniquely identifies a command sent to a connector.


getExecutionCountIdentifier

java.lang.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.


getVirtualDatabaseName

java.lang.String getVirtualDatabaseName()
Get the name of the VDB this query is being run against.

Returns:
VDB name, never null

getVirtualDatabaseVersion

int getVirtualDatabaseVersion()
Get the version of the VDB this query is being run against.

Returns:
VDB version, never null

getSubject

javax.security.auth.Subject getSubject()
Get the user for the user running this query.

Returns:
User, never null

getExecutionPayload

java.io.Serializable getExecutionPayload()
Get the trusted payload passed when the user statement was executed. Teiid has no knowledge about what the payload contains - it is merely passed through the system. It is most often used to pass security information such as credentials.

Given that the Execution Payload is not authenticated by the Teiid system, connector writers are responsible for ensuring its validity.

Returns:
Trusted execution payload if one exists, otherwise null
Since:
4.2

getConnectionIdentifier

java.lang.String getConnectionIdentifier()
Get the identifier for the connection through which the command is being executed. This represents the original JDBC user connection to the Teiid system

Returns:
Connection identifier

keepExecutionAlive

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. It will only be closed at end of the user query.

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.

Parameters:
alive -

getBatchSize

int getBatchSize()
Return the current connector batch size. This may be used as a hint to the underlying source query.

Returns:
the Connector batch size.

addWarning

void addWarning(java.lang.Exception ex)
Add an exception as a warning to this Execution.

Parameters:
ex -

isTransactional

boolean isTransactional()
Flag indicates that the operation needs to be executed in a XA transaction.

Returns:


Copyright © 2011. All Rights Reserved.