public class ConnectionStringHostListProvider extends java.lang.Object implements StaticHostListProvider
| Modifier and Type | Field and Description |
|---|---|
static AwsWrapperProperty |
SINGLE_WRITER_CONNECTION_STRING |
| Constructor and Description |
|---|
ConnectionStringHostListProvider(@NonNull java.util.Properties properties,
java.lang.String initialUrl,
@NonNull HostListProviderService hostListProviderService) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<HostSpec> |
forceRefresh() |
java.util.List<HostSpec> |
forceRefresh(java.sql.Connection connection) |
java.lang.String |
getClusterId() |
HostRole |
getHostRole(java.sql.Connection connection)
Evaluates the host role of the given connection - either a writer or a reader.
|
HostSpec |
identifyConnection(java.sql.Connection connection) |
java.util.List<HostSpec> |
refresh() |
java.util.List<HostSpec> |
refresh(java.sql.Connection connection) |
public static final AwsWrapperProperty SINGLE_WRITER_CONNECTION_STRING
public ConnectionStringHostListProvider(@NonNull java.util.Properties properties,
java.lang.String initialUrl,
@NonNull HostListProviderService hostListProviderService)
public java.util.List<HostSpec> refresh() throws java.sql.SQLException
refresh in interface HostListProviderjava.sql.SQLExceptionpublic java.util.List<HostSpec> refresh(java.sql.Connection connection) throws java.sql.SQLException
refresh in interface HostListProviderjava.sql.SQLExceptionpublic java.util.List<HostSpec> forceRefresh() throws java.sql.SQLException
forceRefresh in interface HostListProviderjava.sql.SQLExceptionpublic java.util.List<HostSpec> forceRefresh(java.sql.Connection connection) throws java.sql.SQLException
forceRefresh in interface HostListProviderjava.sql.SQLExceptionpublic HostRole getHostRole(java.sql.Connection connection)
HostListProvidergetHostRole in interface HostListProviderconnection - a connection to the database instance whose role should be determinedpublic HostSpec identifyConnection(java.sql.Connection connection) throws java.sql.SQLException
identifyConnection in interface HostListProviderjava.sql.SQLExceptionpublic java.lang.String getClusterId()
throws java.lang.UnsupportedOperationException
getClusterId in interface HostListProviderjava.lang.UnsupportedOperationException