Interface ExecutionContext

  • All Known Implementing Classes:

    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 Detail

      • getConnectorIdentifier

        String getConnectorIdentifier()
        Get the identifier for the current connector running the command
        Connector identifier; never null
      • getRequestId

        String getRequestId()
        Get the identifier for the command being executed. This can be correlated back to identifiers exposed in other parts of the system. shortcut for getCommandContext().getRequestId()
        command identifier
      • getPartIdentifier

        String getPartIdentifier()
        This specifies the node id for the atomic request in the relational plan of query.
      • getExecutionCountIdentifier

        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.
      • getVdbName

        String getVdbName()
        Get the name of the VDB this query is being run against. shortcut for getCommandContext().getVdbName()
        VDB name, never null
      • getVdbVersion

        String getVdbVersion()
        Get the version of the VDB this query is being run against. shortcut for getCommandContext().getVdbVersion()
        VDB version
      • getSubject

        Subject getSubject()
        Get the user for the user running this query.
        User, never null
      • getCommandPayload

        Serializable getCommandPayload()
        Get the command payload shortcut for getCommandContext().getCommandPayload()
        the payload or null if one was not set by the client
      • getGeneralHint

        String getGeneralHint()
        Get the collection of general hints as a space concatenated string.
        the general hint or null if none was specified
      • getSourceHint

        String getSourceHint()
        Get the collection of hints designated for this source as a space concatenated string.
        the source hint or null if none was specified
      • getGeneralHints

        Collection<String> getGeneralHints()
        Get the general hints.
        the general hint or null if none was specified
      • getSourceHints

        Collection<String> getSourceHints()
        Get the hints designated for this source.
        the source hint or null if none was specified
      • getConnectionId

        String getConnectionId()
        Get the identifier for the connection through which the command is being executed. This represents the original user connection to the Teiid system shortcut for getCommandContext().getConnectionId()
        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.

        alive -
      • getBatchSize

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

        void addWarning​(Exception ex)
        Add an exception as a warning to this Execution. The exception will be wrapped by a TeiidSQLWarning for the client. The warnings can be consumed through the Statement.getWarnings() method.
        ex -
      • isTransactional

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

        void dataAvailable()
        Signal the engine that data is available and processing should be resumed.
      • getCommandContext

        CommandContext getCommandContext()
        Get the CommandContext
      • logCommand

        void logCommand​(Object... command)
        Log the source command to the command log
        command -
      • getScope

        CacheDirective.Scope getScope()
        Get the result cache scope for the current execution
      • getGeneratedKeyColumns

        List<Column> getGeneratedKeyColumns()
        Get the expected generated key columns for this execution, or null if there are none.
      • returnGeneratedKeys

        GeneratedKeys returnGeneratedKeys()
        If there are generatedKeyColumns, return the GeneratedKeys used to supply the values to the engine.
      • getTransactionIsolation

        int getTransactionIsolation()
        Get the transaction isolation level set by the user request. See the constants on Connection