public class GdbInitAndVerify extends java.lang.Object implements InitialConnectionHandler
InitialConnectionHandler: resolves and validates the home/accessible
regions once (fail-fast), then delegates to the topology role-verification handler. Ports the
legacy GdbReadWriteSplittingPlugin.connect/initSettings.| Constructor and Description |
|---|
GdbInitAndVerify(GdbSettings settings,
InitialConnectionHandler delegate) |
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
onConnect(RwSplitContext ctx,
java.lang.String driverProtocol,
HostSpec hostSpec,
java.util.Properties props,
boolean isInitialConnection,
@NonNull JdbcCallable<java.sql.Connection,java.sql.SQLException> connectFunc)
Invoked from the unified plugin's
connect. |
public GdbInitAndVerify(GdbSettings settings, InitialConnectionHandler delegate)
public java.sql.Connection onConnect(RwSplitContext ctx, java.lang.String driverProtocol, HostSpec hostSpec, java.util.Properties props, boolean isInitialConnection, @NonNull JdbcCallable<java.sql.Connection,java.sql.SQLException> connectFunc) throws java.sql.SQLException
InitialConnectionHandlerconnect.onConnect in interface InitialConnectionHandlerctx - the read/write splitting contextdriverProtocol - the driver protocolhostSpec - the host being connected toprops - the connection propertiesisInitialConnection - whether this is the initial connectionconnectFunc - the downstream connect functionjava.sql.SQLException