程序包 com.mysql.cj
类 CoreSession
- java.lang.Object
-
- com.mysql.cj.CoreSession
-
- 所有已实现的接口:
Session
- 直接已知子类:
MysqlxSession,NativeSession
public abstract class CoreSession extends Object implements Session
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 com.mysql.cj.Session
Session.SessionEventListener
-
-
字段概要
字段 修饰符和类型 字段 说明 protected RuntimeProperty<Boolean>autoReconnectprotected RuntimeProperty<Boolean>autoReconnectForPoolsprotected RuntimeProperty<Boolean>cacheServerConfigurationprotected RuntimeProperty<String>characterEncodingprotected longconnectionCreationTimeMillisThe point in time when this connection was createdprotected RuntimeProperty<Boolean>disconnectOnExpiredPasswordsprotected ExceptionInterceptorexceptionInterceptorprotected RuntimeProperty<Boolean>gatherPerfMetricsprotected HostInfohostInfoprotected LoglogThe logger we're going to useprotected RuntimeProperty<Boolean>maintainTimeStatsprotected MessageBuilder<? extends Message>messageBuilderprotected static LogNULL_LOGGERNull logger shared by all connections at startupprotected PropertySetpropertySetprotected Protocol<? extends Message>protocolprotected intsessionMaxRowsThe max-rows setting for current session
-
构造器概要
构造器 构造器 说明 CoreSession(HostInfo hostInfo, PropertySet propSet)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddListener(Session.SessionEventListener l)Add listener for this session status changes.voidchangeUser(String user, String password, String database)Re-authenticates as the given user and passwordvoidforceClose()Clobbers the physical network connection and marks this session as closed.DataStoreMetadatagetDataStoreMetadata()ExceptionInterceptorgetExceptionInterceptor()HostInfogetHostInfo()StringgetIdentifierQuoteString()LoggetLog()Returns the log mechanism that should be used to log information from/for this Session.<M extends Message>
MessageBuilder<M>getMessageBuilder()ProfilerEventHandlergetProfilerEventHandler()Returns the current ProfilerEventHandler or initializes a new one if none exists.PropertySetgetPropertySet()StringgetQueryTimingUnits()SocketAddressgetRemoteSocketAddress()ServerSessiongetServerSession()longgetThreadId()booleanisSetNeededForAutoCommitMode(boolean autoCommitFlag)booleanisSSLEstablished()voidquit()Log-off of the MySQL server and close the socket.voidremoveListener(Session.SessionEventListener l)Remove session listener.voidsetExceptionInterceptor(ExceptionInterceptor exceptionInterceptor)booleanversionMeetsMinimum(int major, int minor, int subminor)Does the version of the MySQL server we are connected to meet the given minimums?-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 com.mysql.cj.Session
getProcessHost, isClosed, query, query, queryAsync
-
-
-
-
字段详细资料
-
propertySet
protected PropertySet propertySet
-
exceptionInterceptor
protected ExceptionInterceptor exceptionInterceptor
-
log
protected transient Log log
The logger we're going to use
-
NULL_LOGGER
protected static final Log NULL_LOGGER
Null logger shared by all connections at startup
-
messageBuilder
protected MessageBuilder<? extends Message> messageBuilder
-
connectionCreationTimeMillis
protected long connectionCreationTimeMillis
The point in time when this connection was created
-
hostInfo
protected HostInfo hostInfo
-
gatherPerfMetrics
protected RuntimeProperty<Boolean> gatherPerfMetrics
-
characterEncoding
protected RuntimeProperty<String> characterEncoding
-
disconnectOnExpiredPasswords
protected RuntimeProperty<Boolean> disconnectOnExpiredPasswords
-
cacheServerConfiguration
protected RuntimeProperty<Boolean> cacheServerConfiguration
-
autoReconnect
protected RuntimeProperty<Boolean> autoReconnect
-
autoReconnectForPools
protected RuntimeProperty<Boolean> autoReconnectForPools
-
maintainTimeStats
protected RuntimeProperty<Boolean> maintainTimeStats
-
sessionMaxRows
protected int sessionMaxRows
The max-rows setting for current session
-
-
构造器详细资料
-
CoreSession
public CoreSession(HostInfo hostInfo, PropertySet propSet)
-
-
方法详细资料
-
changeUser
public void changeUser(String user, String password, String database)
从接口复制的说明:SessionRe-authenticates as the given user and password- 指定者:
changeUser在接口中Session- 参数:
user- DB user namepassword- DB user passworddatabase- database name
-
getPropertySet
public PropertySet getPropertySet()
- 指定者:
getPropertySet在接口中Session
-
getExceptionInterceptor
public ExceptionInterceptor getExceptionInterceptor()
- 指定者:
getExceptionInterceptor在接口中Session
-
setExceptionInterceptor
public void setExceptionInterceptor(ExceptionInterceptor exceptionInterceptor)
- 指定者:
setExceptionInterceptor在接口中Session
-
getLog
public Log getLog()
从接口复制的说明:SessionReturns the log mechanism that should be used to log information from/for this Session.
-
getHostInfo
public HostInfo getHostInfo()
- 指定者:
getHostInfo在接口中Session
-
getMessageBuilder
public <M extends Message> MessageBuilder<M> getMessageBuilder()
- 指定者:
getMessageBuilder在接口中Session
-
getServerSession
public ServerSession getServerSession()
- 指定者:
getServerSession在接口中Session
-
versionMeetsMinimum
public boolean versionMeetsMinimum(int major, int minor, int subminor)从接口复制的说明:SessionDoes the version of the MySQL server we are connected to meet the given minimums?- 指定者:
versionMeetsMinimum在接口中Session- 参数:
major- major version numberminor- minor version numbersubminor- sub-minor version number- 返回:
- true if current server version equal or higher than provided one
-
getThreadId
public long getThreadId()
- 指定者:
getThreadId在接口中Session
-
quit
public void quit()
从接口复制的说明:SessionLog-off of the MySQL server and close the socket.
-
forceClose
public void forceClose()
从接口复制的说明:SessionClobbers the physical network connection and marks this session as closed.- 指定者:
forceClose在接口中Session
-
isSetNeededForAutoCommitMode
public boolean isSetNeededForAutoCommitMode(boolean autoCommitFlag)
- 指定者:
isSetNeededForAutoCommitMode在接口中Session
-
getProfilerEventHandler
public ProfilerEventHandler getProfilerEventHandler()
从接口复制的说明:SessionReturns the current ProfilerEventHandler or initializes a new one if none exists.- 指定者:
getProfilerEventHandler在接口中Session- 返回:
- the
ProfilerEventHandlerobject.
-
isSSLEstablished
public boolean isSSLEstablished()
- 指定者:
isSSLEstablished在接口中Session
-
getRemoteSocketAddress
public SocketAddress getRemoteSocketAddress()
- 指定者:
getRemoteSocketAddress在接口中Session
-
addListener
public void addListener(Session.SessionEventListener l)
从接口复制的说明:SessionAdd listener for this session status changes.- 指定者:
addListener在接口中Session- 参数:
l-Session.SessionEventListenerinstance.
-
removeListener
public void removeListener(Session.SessionEventListener l)
从接口复制的说明:SessionRemove session listener.- 指定者:
removeListener在接口中Session- 参数:
l-Session.SessionEventListenerinstance.
-
getIdentifierQuoteString
public String getIdentifierQuoteString()
- 指定者:
getIdentifierQuoteString在接口中Session
-
getDataStoreMetadata
public DataStoreMetadata getDataStoreMetadata()
- 指定者:
getDataStoreMetadata在接口中Session
-
getQueryTimingUnits
public String getQueryTimingUnits()
- 指定者:
getQueryTimingUnits在接口中Session
-
-