public class MysqlConnectorJTargetDriverDialect extends GenericTargetDriverDialect
ALLOWED_ON_CLOSED_METHODS, NETWORK_BOUND_METHODS_FOR_ENTIRE_RESULTSET| Constructor and Description |
|---|
MysqlConnectorJTargetDriverDialect() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
getAllowedOnConnectionMethodNames() |
@Nullable java.lang.String |
getSQLQueryString(java.sql.PreparedStatement ps) |
java.lang.String |
getSQLState(java.lang.Throwable throwable) |
boolean |
isDialect(java.sql.Driver driver) |
boolean |
isDialect(java.lang.String dataSourceClass) |
boolean |
isDriverRegistered() |
boolean |
ping(@NonNull java.sql.Connection connection)
Attempts to communicate to a database node in order to measure network latency.
|
ConnectInfo |
prepareConnectInfo(@NonNull java.lang.String protocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props) |
void |
prepareDataSource(@NonNull javax.sql.DataSource dataSource,
@NonNull java.lang.String protocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props) |
java.lang.String |
prepareTargetDataSource(@NonNull javax.sql.CommonDataSource dataSource,
@NonNull java.lang.String url,
@NonNull java.util.Properties props)
Applies AWS Wrapper connection settings that a target data source can only receive through
driver-specific bean setters (for example connect/socket timeouts, whose unit differs per
driver), and returns the connection URL to apply to that data source.
|
void |
registerDriver() |
abortConnection, findSQLQueryString, getEncryptedBytes, getNetworkBoundMethodNames, registerDataType, setEncryptedParameter, updateInternalStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveHostSelectionPropertiespublic boolean isDialect(java.sql.Driver driver)
isDialect in interface TargetDriverDialectisDialect in class GenericTargetDriverDialectpublic boolean isDialect(java.lang.String dataSourceClass)
isDialect in interface TargetDriverDialectisDialect in class GenericTargetDriverDialectpublic ConnectInfo prepareConnectInfo(@NonNull java.lang.String protocol, @NonNull HostSpec hostSpec, @NonNull java.util.Properties props) throws java.sql.SQLException
prepareConnectInfo in interface TargetDriverDialectprepareConnectInfo in class GenericTargetDriverDialectjava.sql.SQLExceptionpublic void prepareDataSource(@NonNull javax.sql.DataSource dataSource,
@NonNull java.lang.String protocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props)
throws java.sql.SQLException
prepareDataSource in interface TargetDriverDialectprepareDataSource in class GenericTargetDriverDialectjava.sql.SQLExceptionpublic java.lang.String prepareTargetDataSource(@NonNull javax.sql.CommonDataSource dataSource,
@NonNull java.lang.String url,
@NonNull java.util.Properties props)
throws java.sql.SQLException
TargetDriverDialectThis is used by the XA datasource path, which configures a target driver
XADataSource directly instead of going through
TargetDriverDialect.prepareConnectInfo(String, HostSpec, Properties). Because that path hands the target
only its own (non-wrapper) properties, wrapper properties such as socketTimeout would
otherwise be dropped. Dialects whose target data source cannot express a setting as a bean
property may instead add it to the returned URL.
The default implementation applies nothing and returns url unchanged.
dataSource - the target driver data source being configured.url - the target driver URL, with AWS Wrapper parameters already removed.props - the effective connection properties, including AWS Wrapper properties.java.sql.SQLException - if a setting cannot be applied to the target data source.public boolean isDriverRegistered()
throws java.sql.SQLException
isDriverRegistered in interface TargetDriverDialectisDriverRegistered in class GenericTargetDriverDialectjava.sql.SQLExceptionpublic void registerDriver()
throws java.sql.SQLException
registerDriver in interface TargetDriverDialectregisterDriver in class GenericTargetDriverDialectjava.sql.SQLExceptionpublic boolean ping(@NonNull java.sql.Connection connection)
TargetDriverDialectping in interface TargetDriverDialectping in class GenericTargetDriverDialectconnection - The database connection to a node to ping.public java.util.Set<java.lang.String> getAllowedOnConnectionMethodNames()
getAllowedOnConnectionMethodNames in interface TargetDriverDialectgetAllowedOnConnectionMethodNames in class GenericTargetDriverDialectpublic java.lang.String getSQLState(java.lang.Throwable throwable)
getSQLState in interface TargetDriverDialectgetSQLState in class GenericTargetDriverDialectpublic @Nullable java.lang.String getSQLQueryString(java.sql.PreparedStatement ps)
getSQLQueryString in interface TargetDriverDialectgetSQLQueryString in class GenericTargetDriverDialect