public class AuroraInitialConnectionStrategyPlugin extends AbstractConnectionPlugin
| Modifier and Type | Field and Description |
|---|---|
static AwsWrapperProperty |
OPEN_CONNECTION_RETRY_INTERVAL_MS |
static AwsWrapperProperty |
OPEN_CONNECTION_RETRY_TIMEOUT_MS |
static AwsWrapperProperty |
READER_HOST_SELECTOR_STRATEGY |
static AwsWrapperProperty |
VERIFY_OPENED_CONNECTION_TYPE |
| Constructor and Description |
|---|
AuroraInitialConnectionStrategyPlugin(PluginService pluginService,
java.util.Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
connect(java.lang.String driverProtocol,
HostSpec hostSpec,
java.util.Properties props,
boolean isInitialConnection,
JdbcCallable<java.sql.Connection,java.sql.SQLException> connectFunc)
Establishes a connection to the given host using the given driver protocol and properties.
|
java.util.Set<java.lang.String> |
getSubscribedMethods() |
protected long |
getTime() |
void |
initHostProvider(java.lang.String driverProtocol,
java.lang.String initialUrl,
java.util.Properties props,
HostListProviderService hostListProviderService,
JdbcCallable<java.lang.Void,java.sql.SQLException> initHostProviderFunc) |
acceptsStrategy, execute, forceConnect, getHostSpecByStrategy, getHostSpecByStrategy, notifyConnectionChanged, notifyNodeListChangedpublic static final AwsWrapperProperty READER_HOST_SELECTOR_STRATEGY
public static final AwsWrapperProperty OPEN_CONNECTION_RETRY_TIMEOUT_MS
public static final AwsWrapperProperty OPEN_CONNECTION_RETRY_INTERVAL_MS
public static final AwsWrapperProperty VERIFY_OPENED_CONNECTION_TYPE
public AuroraInitialConnectionStrategyPlugin(PluginService pluginService, java.util.Properties properties)
public java.util.Set<java.lang.String> getSubscribedMethods()
getSubscribedMethods in interface ConnectionPlugingetSubscribedMethods in class AbstractConnectionPluginpublic void initHostProvider(java.lang.String driverProtocol,
java.lang.String initialUrl,
java.util.Properties props,
HostListProviderService hostListProviderService,
JdbcCallable<java.lang.Void,java.sql.SQLException> initHostProviderFunc)
throws java.sql.SQLException
initHostProvider in interface ConnectionPlugininitHostProvider in class AbstractConnectionPluginjava.sql.SQLExceptionpublic java.sql.Connection connect(java.lang.String driverProtocol,
HostSpec hostSpec,
java.util.Properties props,
boolean isInitialConnection,
JdbcCallable<java.sql.Connection,java.sql.SQLException> connectFunc)
throws java.sql.SQLException
ConnectionPluginConnectionProvider has been set with
Driver.setCustomConnectionProvider(ConnectionProvider) and
ConnectionProvider.acceptsUrl(String, HostSpec, Properties) returns true for the given
protocol, host, and properties, the connection will be created by the non-default
ConnectionProvider. Otherwise, the connection will be created by the default
ConnectionProvider. The default ConnectionProvider will be DriverConnectionProvider for
connections requested via the DriverManager and
DataSourceConnectionProvider for connections requested via an
AwsWrapperDataSource.connect in interface ConnectionPluginconnect in class AbstractConnectionPlugindriverProtocol - the driver protocol that should be used to establish the connectionhostSpec - the host details for the desired connectionprops - the connection propertiesisInitialConnection - a boolean indicating whether the current Connection is
establishing an initial physical connection to the database or has
already established a physical connection in the pastconnectFunc - the function to call to continue the connect request down the
connect pipelineConnection to the requested hostjava.sql.SQLException - if there was an error establishing a Connection to the requested
hostprotected long getTime()