public interface RoutingSignal
setReadOnly signal, SQL-based routing, and their composition.| Modifier and Type | Method and Description |
|---|---|
default java.util.Set<java.lang.String> |
extraSubscribedMethods()
Extra JDBC method names this signal needs subscribed beyond the plugin's defaults (e.g.
|
TargetRole |
resolve(RwSplitContext ctx,
java.lang.String methodName,
@Nullable java.lang.Object[] args)
Resolves the desired role for this call.
|
default TargetRole |
resolveForBoundStatement(RwSplitContext ctx)
Resolves the desired role for an already-bound plain
Statement from the parsed SQL,
used only for the optional statement-rebinding path. |
default java.util.Set<java.lang.String> extraSubscribedMethods()
TargetRole resolve(RwSplitContext ctx, java.lang.String methodName, @Nullable java.lang.Object[] args) throws java.sql.SQLException
TargetRole.NO_DECISION means the method is not
a routing trigger for this signal (the signal abstains).ctx - the read/write splitting contextmethodName - the JDBC method being invokedargs - the method arguments (may be null)java.sql.SQLExceptiondefault TargetRole resolveForBoundStatement(RwSplitContext ctx) throws java.sql.SQLException
Statement from the parsed SQL,
used only for the optional statement-rebinding path. Returns TargetRole.NO_DECISION
by default (signals that do not route on SQL do not reroute bound statements).ctx - the read/write splitting contextTargetRole.NO_DECISION if this signal does not applyjava.sql.SQLException