public final class ConnectionContext extends Object implements CodecContext
WARNING: Do NOT change any data outside of this project, try to configure ConnectionFactoryOptions
or MySqlConnectionConfiguration to control connection context and client behavior.
| Modifier and Type | Method and Description |
|---|---|
Capability |
getCapability()
Get the connection capability.
|
CharCollation |
getClientCollation()
Gets the
CharCollation that the client is using. |
int |
getConnectionId()
Get the connection identifier that is specified by server.
|
int |
getLocalInfileBufferSize()
Gets the local infile buffer size.
|
@Nullable Path |
getLocalInfilePath()
Gets the allowed local infile path.
|
short |
getServerStatuses()
Get the bitmap of server statuses.
|
ServerVersion |
getServerVersion()
Gets the MySQL server version, which is available after database user logon.
|
ZoneId |
getTimeZone()
Gets the
ZoneId of connection. |
ZeroDateOption |
getZeroDateOption()
Gets the option for zero date handling which is set by connection configuration.
|
void |
init(int connectionId,
ServerVersion version,
Capability capability)
Initializes this context.
|
boolean |
isMariaDb()
Checks server is MariaDB or not.
|
boolean |
isPreserveInstants()
Checks if the connection is set to preserve instants, i.e.
|
boolean |
isTimeZoneInitialized() |
void |
setServerStatuses(short serverStatuses)
Updates server statuses.
|
public int getConnectionId()
public void init(int connectionId,
ServerVersion version,
Capability capability)
connectionId - the connection identifier that is specified by server.version - the server version.capability - the connection capabilities.public ServerVersion getServerVersion()
CodecContextgetServerVersion in interface CodecContextServerVersion.public CharCollation getClientCollation()
CodecContextCharCollation that the client is using.getClientCollation in interface CodecContextCharCollation.public boolean isPreserveInstants()
CodecContextisPreserveInstants in interface CodecContextpublic ZoneId getTimeZone()
CodecContextZoneId of connection.getTimeZone in interface CodecContextZoneId.public boolean isTimeZoneInitialized()
public boolean isMariaDb()
CodecContextisMariaDb in interface CodecContextpublic ZeroDateOption getZeroDateOption()
CodecContextgetZeroDateOption in interface CodecContextZeroDateOption.@Nullable public @Nullable Path getLocalInfilePath()
public int getLocalInfileBufferSize()
public short getServerStatuses()
public void setServerStatuses(short serverStatuses)
serverStatuses - the bitmap of server statuses.public Capability getCapability()
Copyright © 2018–2024 asyncer.io. All rights reserved.