public abstract class CoreSession extends java.lang.Object implements Session
Session.SessionEventListener| Modifier and Type | Field and Description |
|---|---|
protected RuntimeProperty<java.lang.Boolean> |
autoReconnect |
protected RuntimeProperty<java.lang.Boolean> |
autoReconnectForPools |
protected RuntimeProperty<java.lang.Boolean> |
cacheServerConfiguration |
protected RuntimeProperty<java.lang.String> |
characterEncoding |
protected long |
connectionCreationTimeMillis
The point in time when this connection was created
|
protected RuntimeProperty<java.lang.Boolean> |
disconnectOnExpiredPasswords |
protected ExceptionInterceptor |
exceptionInterceptor |
protected RuntimeProperty<java.lang.Boolean> |
gatherPerfMetrics |
protected HostInfo |
hostInfo |
protected Log |
log
The logger we're going to use
|
protected RuntimeProperty<java.lang.Boolean> |
maintainTimeStats |
protected MessageBuilder<? extends Message> |
messageBuilder |
protected static Log |
NULL_LOGGER
Null logger shared by all connections at startup
|
protected PropertySet |
propertySet |
protected Protocol<? extends Message> |
protocol |
protected int |
sessionMaxRows
The max-rows setting for current session
|
| Constructor and Description |
|---|
CoreSession(HostInfo hostInfo,
PropertySet propSet) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Session.SessionEventListener l)
Add listener for this session status changes.
|
void |
changeUser(java.lang.String user,
java.lang.String password,
java.lang.String database)
Re-authenticates as the given user and password
|
void |
forceClose()
Clobbers the physical network connection and marks this session as closed.
|
DataStoreMetadata |
getDataStoreMetadata() |
ExceptionInterceptor |
getExceptionInterceptor() |
HostInfo |
getHostInfo() |
java.lang.String |
getIdentifierQuoteString() |
Log |
getLog()
Returns the log mechanism that should be used to log information from/for this Session.
|
<M extends Message> |
getMessageBuilder() |
ProfilerEventHandler |
getProfilerEventHandler()
Returns the current ProfilerEventHandler or initializes a new one if none exists.
|
PropertySet |
getPropertySet() |
java.lang.String |
getQueryTimingUnits() |
java.net.SocketAddress |
getRemoteSocketAddress() |
ServerSession |
getServerSession() |
long |
getThreadId() |
boolean |
isSetNeededForAutoCommitMode(boolean autoCommitFlag) |
boolean |
isSSLEstablished() |
void |
quit()
Log-off of the MySQL server and close the socket.
|
void |
removeListener(Session.SessionEventListener l)
Remove session listener.
|
void |
setExceptionInterceptor(ExceptionInterceptor exceptionInterceptor) |
boolean |
versionMeetsMinimum(int major,
int minor,
int subminor)
Does the version of the MySQL server we are connected to meet the given
minimums?
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProcessHost, isClosed, query, query, queryAsyncprotected PropertySet propertySet
protected ExceptionInterceptor exceptionInterceptor
protected transient Log log
protected static final Log NULL_LOGGER
protected MessageBuilder<? extends Message> messageBuilder
protected long connectionCreationTimeMillis
protected HostInfo hostInfo
protected RuntimeProperty<java.lang.Boolean> gatherPerfMetrics
protected RuntimeProperty<java.lang.String> characterEncoding
protected RuntimeProperty<java.lang.Boolean> disconnectOnExpiredPasswords
protected RuntimeProperty<java.lang.Boolean> cacheServerConfiguration
protected RuntimeProperty<java.lang.Boolean> autoReconnect
protected RuntimeProperty<java.lang.Boolean> autoReconnectForPools
protected RuntimeProperty<java.lang.Boolean> maintainTimeStats
protected int sessionMaxRows
public CoreSession(HostInfo hostInfo, PropertySet propSet)
public void changeUser(java.lang.String user,
java.lang.String password,
java.lang.String database)
SessionchangeUser in interface Sessionuser - DB user namepassword - DB user passworddatabase - database namepublic PropertySet getPropertySet()
getPropertySet in interface Sessionpublic ExceptionInterceptor getExceptionInterceptor()
getExceptionInterceptor in interface Sessionpublic void setExceptionInterceptor(ExceptionInterceptor exceptionInterceptor)
setExceptionInterceptor in interface Sessionpublic Log getLog()
Sessionpublic HostInfo getHostInfo()
getHostInfo in interface Sessionpublic <M extends Message> MessageBuilder<M> getMessageBuilder()
getMessageBuilder in interface Sessionpublic ServerSession getServerSession()
getServerSession in interface Sessionpublic boolean versionMeetsMinimum(int major,
int minor,
int subminor)
SessionversionMeetsMinimum in interface Sessionmajor - major version numberminor - minor version numbersubminor - sub-minor version numberpublic long getThreadId()
getThreadId in interface Sessionpublic void quit()
Sessionpublic void forceClose()
SessionforceClose in interface Sessionpublic boolean isSetNeededForAutoCommitMode(boolean autoCommitFlag)
isSetNeededForAutoCommitMode in interface Sessionpublic ProfilerEventHandler getProfilerEventHandler()
SessiongetProfilerEventHandler in interface SessionProfilerEventHandler object.public boolean isSSLEstablished()
isSSLEstablished in interface Sessionpublic java.net.SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in interface Sessionpublic void addListener(Session.SessionEventListener l)
SessionaddListener in interface Sessionl - Session.SessionEventListener instance.public void removeListener(Session.SessionEventListener l)
SessionremoveListener in interface Sessionl - Session.SessionEventListener instance.public java.lang.String getIdentifierQuoteString()
getIdentifierQuoteString in interface Sessionpublic DataStoreMetadata getDataStoreMetadata()
getDataStoreMetadata in interface Sessionpublic java.lang.String getQueryTimingUnits()
getQueryTimingUnits in interface Session