public class VerifiedEndpointUpdatePolicy extends java.lang.Object implements ConnectionUpdatePolicy
ConnectionUpdatePolicy: adopt the current connection as the cached
writer/reader only when it is a new connection matching the endpoint role, optionally verifying
the role via the database. Ports the legacy
SimpleReadWriteSplittingPlugin.shouldUpdate*Connection.| Constructor and Description |
|---|
VerifiedEndpointUpdatePolicy(RoleClassifier roleClassifier,
boolean verifyNewConnections) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldUpdateReader(RwSplitContext ctx,
java.sql.Connection currentConnection,
HostSpec currentHost) |
boolean |
shouldUpdateWriter(RwSplitContext ctx,
java.sql.Connection currentConnection,
HostSpec currentHost) |
public VerifiedEndpointUpdatePolicy(RoleClassifier roleClassifier, boolean verifyNewConnections)
public boolean shouldUpdateWriter(RwSplitContext ctx, java.sql.Connection currentConnection, HostSpec currentHost) throws java.sql.SQLException
shouldUpdateWriter in interface ConnectionUpdatePolicyjava.sql.SQLExceptionpublic boolean shouldUpdateReader(RwSplitContext ctx, java.sql.Connection currentConnection, HostSpec currentHost) throws java.sql.SQLException
shouldUpdateReader in interface ConnectionUpdatePolicyjava.sql.SQLException