Interface Context

All Known Implementing Classes:
BaseContext, RedoContext

public interface Context
  • Method Details

    • getThreadId

      long getThreadId()
      return current thread id
      Returns:
      current server thread id
    • setThreadId

      void setThreadId(long connectionId)
      Indicate server connection Id (not truncated)
      Parameters:
      connectionId - connection id
    • getAutoIncrement

      Long getAutoIncrement()
      Get server current auto_increment value
      Returns:
      server auto increment
    • setAutoIncrement

      void setAutoIncrement(long autoIncrement)
      Set server autoincrement value
      Parameters:
      autoIncrement - current server autoincrement value
    • setRedirectUrl

      void setRedirectUrl(String redirectUrl)
      Set server redirection url
      Parameters:
      redirectUrl - redirect url
    • getRedirectUrl

      String getRedirectUrl()
    • getSeed

      byte[] getSeed()
      Get connection initial seed
      Returns:
      initial seed
    • hasServerCapability

      boolean hasServerCapability(long flag)
      has server capability
      Parameters:
      flag - capability to check
      Returns:
      true if server has capability
    • hasClientCapability

      boolean hasClientCapability(long flag)
      has client capability
      Parameters:
      flag - capability to check
      Returns:
      true if client has capability
    • permitPipeline

      boolean permitPipeline()
      Does server and client permit pipeline
      Returns:
      true if permitted
    • getServerStatus

      int getServerStatus()
      Get server connection state
      Returns:
      server status
    • setServerStatus

      void setServerStatus(int serverStatus)
      Set server connection state
      Parameters:
      serverStatus - server status
    • getDatabase

      String getDatabase()
      Get current connection database
      Returns:
      database
    • setDatabase

      void setDatabase(String database)
      set current database context
      Parameters:
      database - database
    • getVersion

      ServerVersion getVersion()
      Retrieve server version information
      Returns:
      server version
    • isEofDeprecated

      boolean isEofDeprecated()
      does protocol remove EOF in exchanges
      Returns:
      if EOF packet are deprecated
    • canSkipMeta

      boolean canSkipMeta()
      Can server skip prepared statement metadata
      Returns:
      true if possible
    • getColumnDecoderFunction

      Function<ReadableByteBuf,ColumnDecoder> getColumnDecoderFunction()
      Column decoder function
      Returns:
      Column decoder function
    • getWarning

      int getWarning()
      has server warnings
      Returns:
      has warnings
    • setWarning

      void setWarning(int warning)
      set server state warning number
      Parameters:
      warning - warning number
    • getExceptionFactory

      ExceptionFactory getExceptionFactory()
      Get connection exception factory
      Returns:
      exception factory
    • getConf

      Configuration getConf()
      Get connection configuration
      Returns:
      configuration
    • canUseTransactionIsolation

      boolean canUseTransactionIsolation()
      Can rely on transaction_isolation or keep using deprecated tx_isolation variable
      Returns:
      true if you can use transaction_isolation
    • getTransactionIsolationLevel

      Integer getTransactionIsolationLevel()
      Get connection transaction isolation level
      Returns:
      connection transaction isolation level
    • setTransactionIsolationLevel

      void setTransactionIsolationLevel(Integer transactionIsolationLevel)
      Set current connection transaction isolation level
      Parameters:
      transactionIsolationLevel - new connection transaction isolation level
    • getPrepareCache

      PrepareCache getPrepareCache()
      get LRU prepare cache object
      Returns:
      prepare cache
    • resetPrepareCache

      void resetPrepareCache()
      Reset prepare cache (after a failover)
    • getStateFlag

      int getStateFlag()
      return connection current state change flag
      Returns:
      connection current state change flag
    • resetStateFlag

      void resetStateFlag()
      reset connection state change flag
    • addStateFlag

      void addStateFlag(int state)
      Indicate connection state (for pooling)
      Parameters:
      state - indicate that some connection state has changed
    • setTreadsConnected

      void setTreadsConnected(long threadsConnected)
      Indicate the number of connection on this server
      Parameters:
      threadsConnected - number of connected threads
    • getCharset

      String getCharset()
      Retrieve current charset if session state get it
      Returns:
      current charset
    • setCharset

      void setCharset(String charset)
      Indicate server charset change
      Parameters:
      charset - server charset
    • getConnectionTimeZone

      TimeZone getConnectionTimeZone()
    • setConnectionTimeZone

      void setConnectionTimeZone(TimeZone connectionTimeZone)
    • getDefaultCalendar

      Calendar getDefaultCalendar()
      Get calendar depending on configuration
      Returns:
      calendar