接口 ServerSession
-
- 所有已知实现类:
NativeServerSession,XServerSession
public interface ServerSessionKeeps the effective states of server/session variables, contains methods for initial retrieving of these states and for their actualization.
-
-
字段概要
字段 修饰符和类型 字段 说明 static intTRANSACTION_COMPLETEDOld SERVER_STATUS_IN_TRANS state was 1 and current one is 0.static intTRANSACTION_IN_PROGRESSThere was no change between old and current SERVER_STATUS_IN_TRANS state and it is 1.static intTRANSACTION_NOT_STARTEDThere was no change between old and current SERVER_STATUS_IN_TRANS state and it is 0.static intTRANSACTION_STARTEDOld SERVER_STATUS_IN_TRANS state was 0 and current one is 1.
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 booleancursorExists()Server will only open a cursor and set this flag if it can, otherwise it punts and goes back to mysql_store_results() behavior.ServerCapabilitiesgetCapabilities()CharsetSettingsgetCharsetSettings()longgetClientParam()TimeZonegetDefaultTimeZone()The default time zone used to marshal date/time values to/from the server.intgetOldStatusFlags()default ServerSessionStateControllergetServerSessionStateController()StringgetServerVariable(String name)intgetServerVariable(String variableName, int fallbackValue)Map<String,String>getServerVariables()ServerVersiongetServerVersion()Get the version of the MySQL server we are talking to.TimeZonegetSessionTimeZone()intgetStatusFlags()intgetTransactionState()booleanhasLongColumnInfo()booleanhasMoreResults()booleaninTransactionOnServer()booleanisAutocommit()booleanisAutoCommit()booleanisEOFDeprecated()booleanisLastRowSent()booleanisLowerCaseTableNames()Is the server configured to use lower-case table names only?booleanisNoBackslashEscapesSet()booleanisQueryCacheEnabled()booleanisServerTruncatesFracSecs()booleanisVersion(ServerVersion version)Is the version of the MySQL server we are connected to the given version?booleannoGoodIndexUsed()booleannoIndexUsed()booleanqueryWasSlow()voidsetAutoCommit(boolean autoCommit)voidsetCapabilities(ServerCapabilities capabilities)voidsetCharsetSettings(CharsetSettings charsetSettings)voidsetClientParam(long clientParam)voidsetOldStatusFlags(int statusFlags)voidsetServerVariables(Map<String,String> serverVariables)voidsetSessionTimeZone(TimeZone sessionTimeZone)voidsetStatusFlags(int statusFlags)Sets new server status (from response) without saving it's old statevoidsetStatusFlags(int statusFlags, boolean saveOldStatusFlags)Sets new server status (from response)booleanstoresLowerCaseTableNames()booleansupportsQueryAttributes()booleanuseAnsiQuotedIdentifiers()booleanuseMultiResults()
-
-
-
字段详细资料
-
TRANSACTION_NOT_STARTED
static final int TRANSACTION_NOT_STARTED
There was no change between old and current SERVER_STATUS_IN_TRANS state and it is 0.- 另请参阅:
- 常量字段值
-
TRANSACTION_IN_PROGRESS
static final int TRANSACTION_IN_PROGRESS
There was no change between old and current SERVER_STATUS_IN_TRANS state and it is 1.- 另请参阅:
- 常量字段值
-
TRANSACTION_STARTED
static final int TRANSACTION_STARTED
Old SERVER_STATUS_IN_TRANS state was 0 and current one is 1.- 另请参阅:
- 常量字段值
-
TRANSACTION_COMPLETED
static final int TRANSACTION_COMPLETED
Old SERVER_STATUS_IN_TRANS state was 1 and current one is 0.- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
getCapabilities
ServerCapabilities getCapabilities()
-
setCapabilities
void setCapabilities(ServerCapabilities capabilities)
-
getStatusFlags
int getStatusFlags()
-
setStatusFlags
void setStatusFlags(int statusFlags)
Sets new server status (from response) without saving it's old state- 参数:
statusFlags- server status flags
-
setStatusFlags
void setStatusFlags(int statusFlags, boolean saveOldStatusFlags)Sets new server status (from response)- 参数:
statusFlags- new server status flagssaveOldStatusFlags- true if old server status flags should be preserved
-
getOldStatusFlags
int getOldStatusFlags()
-
setOldStatusFlags
void setOldStatusFlags(int statusFlags)
-
getTransactionState
int getTransactionState()
- 返回:
- TRANSACTION_NOT_STARTED, TRANSACTION_IN_PROGRESS, TRANSACTION_STARTED or TRANSACTION_COMPLETED
-
inTransactionOnServer
boolean inTransactionOnServer()
-
cursorExists
boolean cursorExists()
Server will only open a cursor and set this flag if it can, otherwise it punts and goes back to mysql_store_results() behavior.- 返回:
- SERVER_STATUS_CURSOR_EXISTS status flag value.
-
isAutocommit
boolean isAutocommit()
-
hasMoreResults
boolean hasMoreResults()
-
isLastRowSent
boolean isLastRowSent()
-
noGoodIndexUsed
boolean noGoodIndexUsed()
-
noIndexUsed
boolean noIndexUsed()
-
queryWasSlow
boolean queryWasSlow()
-
getClientParam
long getClientParam()
-
setClientParam
void setClientParam(long clientParam)
-
hasLongColumnInfo
boolean hasLongColumnInfo()
-
useMultiResults
boolean useMultiResults()
-
isEOFDeprecated
boolean isEOFDeprecated()
-
supportsQueryAttributes
boolean supportsQueryAttributes()
-
getServerVariable
int getServerVariable(String variableName, int fallbackValue)
-
getServerVersion
ServerVersion getServerVersion()
Get the version of the MySQL server we are talking to.- 返回:
ServerVersion
-
isVersion
boolean isVersion(ServerVersion version)
Is the version of the MySQL server we are connected to the given version?- 参数:
version- the version to check for- 返回:
- true if the version of the MySQL server we are connected is the given version
-
isLowerCaseTableNames
boolean isLowerCaseTableNames()
Is the server configured to use lower-case table names only?- 返回:
- true if lower_case_table_names is 'on'
-
storesLowerCaseTableNames
boolean storesLowerCaseTableNames()
-
isQueryCacheEnabled
boolean isQueryCacheEnabled()
-
isNoBackslashEscapesSet
boolean isNoBackslashEscapesSet()
-
useAnsiQuotedIdentifiers
boolean useAnsiQuotedIdentifiers()
-
isServerTruncatesFracSecs
boolean isServerTruncatesFracSecs()
-
isAutoCommit
boolean isAutoCommit()
-
setAutoCommit
void setAutoCommit(boolean autoCommit)
-
getSessionTimeZone
TimeZone getSessionTimeZone()
-
setSessionTimeZone
void setSessionTimeZone(TimeZone sessionTimeZone)
-
getDefaultTimeZone
TimeZone getDefaultTimeZone()
The default time zone used to marshal date/time values to/from the server. This is used when methods like getDate() are called without a calendar argument.- 返回:
- The default JVM time zone
-
getServerSessionStateController
default ServerSessionStateController getServerSessionStateController()
-
getCharsetSettings
CharsetSettings getCharsetSettings()
-
setCharsetSettings
void setCharsetSettings(CharsetSettings charsetSettings)
-
-