Interface Context

    • Method Detail

      • 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

        java.lang.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​(java.lang.String redirectUrl)
        Set server redirection url
        Parameters:
        redirectUrl - redirect url
      • getRedirectUrl

        java.lang.String getRedirectUrl()
        get redirect Url if server indicate reconnection url
        Returns:
        null if no redirection required, value if so
      • 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

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

        void setDatabase​(java.lang.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

        java.util.function.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

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

        void setTransactionIsolationLevel​(java.lang.Integer transactionIsolationLevel)
        Set current connection transaction isolation level
        Parameters:
        transactionIsolationLevel - new connection transaction isolation level
      • getPrepareCacheCmd

        Prepare getPrepareCacheCmd​(java.lang.String sql,
                                   BasePreparedStatement preparedStatement)
        Return cached prepare if key match
        Parameters:
        sql - sql command
        preparedStatement - current statement
        Returns:
        Prepare if found, null if not
      • putPrepareCacheCmd

        Prepare putPrepareCacheCmd​(java.lang.String sql,
                                   Prepare result,
                                   BasePreparedStatement preparedStatement)
        Put prepare result in cache
        Parameters:
        sql - sql command
        result - prepare result
        preparedStatement - current statement
        Returns:
        Prepare if was already cached
      • 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

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

        void setCharset​(java.lang.String charset)
        Indicate server charset change
        Parameters:
        charset - server charset
      • getConnectionTimeZone

        java.util.TimeZone getConnectionTimeZone()
        Get current connection timezone
        Returns:
        connection timezone
      • setConnectionTimeZone

        void setConnectionTimeZone​(java.util.TimeZone connectionTimeZone)
        Set current connection timezone
        Parameters:
        connectionTimeZone - connection timezone
      • getDefaultCalendar

        java.util.Calendar getDefaultCalendar()
        Get calendar depending on configuration
        Returns:
        calendar