Interface EngineConnection

All Superinterfaces:
AutoCloseable, Connection, Wrapper
All Known Implementing Classes:
BrokeredConnection, BrokeredConnection42, EmbedConnection

public interface EngineConnection extends Connection
Additional methods the embedded engine exposes on its Connection object implementations. An internal api only, mainly for the network server. Allows consistent interaction between EmbedConnections and BrokeredConnections.
  • Method Details

    • setDrdaID

      void setDrdaID(String drdaID)
      Set the DRDA identifier for this connection.
    • isInGlobalTransaction

      boolean isInGlobalTransaction()
      Is this a global transaction
      Returns:
      true if this is a global XA transaction
    • setPrepareIsolation

      void setPrepareIsolation(int level) throws SQLException
      Set the transaction isolation level that will be used for the next prepare. Used by network server to implement DB2 style isolation levels. Note the passed in level using the Derby constants from ExecutionContext and not the JDBC constants from java.sql.Connection.
      Parameters:
      level - Isolation level to change to. level is the DB2 level specified in the package names which happen to correspond to our internal levels. If level == ExecutionContext.UNSPECIFIED_ISOLATION, the statement won't be prepared with an isolation level.
      Throws:
      SQLException
    • getPrepareIsolation

      int getPrepareIsolation() throws SQLException
      Return prepare isolation
      Throws:
      SQLException
    • addWarning

      void addWarning(SQLWarning newWarning) throws SQLException
      Add a SQLWarning to this Connection object.
      Parameters:
      newWarning - Warning to be added, will be chained to any existing warnings.
      Throws:
      SQLException
    • getLOBMapping

      Object getLOBMapping(int key) throws SQLException
      Get the LOB reference corresponding to the locator.
      Parameters:
      key - the integer that represents the LOB locator value.
      Returns:
      the LOB Object corresponding to this locator.
      Throws:
      SQLException
    • getCurrentSchemaName

      String getCurrentSchemaName() throws SQLException
      Obtain the name of the current schema, so that the NetworkServer can use it for piggy-backing
      Returns:
      the current schema name
      Throws:
      SQLException
    • resetFromPool

      void resetFromPool() throws SQLException
      Resets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection).

      Note that resetting the transaction isolation level is not performed as part of this method. Temporary tables, IDENTITY_VAL_LOCAL and current schema are reset.

      Throws:
      SQLException
    • getSchema

      String getSchema() throws SQLException
      Get the name of the current schema.
      Specified by:
      getSchema in interface Connection
      Throws:
      SQLException
    • setSchema

      void setSchema(String schemaName) throws SQLException
      Set the default schema for the Connection.
      Specified by:
      setSchema in interface Connection
      Throws:
      SQLException
    • abort

      void abort(Executor executor) throws SQLException
      Specified by:
      abort in interface Connection
      Throws:
      SQLException
    • setNetworkTimeout

      void setNetworkTimeout(Executor executor, int millis) throws SQLException
      Specified by:
      setNetworkTimeout in interface Connection
      Throws:
      SQLException
    • getNetworkTimeout

      int getNetworkTimeout() throws SQLException
      Specified by:
      getNetworkTimeout in interface Connection
      Throws:
      SQLException