public class ReadOnlyFlagSignal extends java.lang.Object implements RoutingSignal
RoutingSignal: routes purely on Connection.setReadOnly(boolean).
setReadOnly(true) resolves to TargetRole.READER, setReadOnly(false) to
TargetRole.WRITER; every other method resolves to TargetRole.NO_DECISION.| Constructor and Description |
|---|
ReadOnlyFlagSignal() |
| Modifier and Type | Method and Description |
|---|---|
TargetRole |
resolve(RwSplitContext ctx,
java.lang.String methodName,
@Nullable java.lang.Object[] args)
Resolves the desired role for this call.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitextraSubscribedMethods, resolveForBoundStatementpublic TargetRole resolve(RwSplitContext ctx, java.lang.String methodName, @Nullable java.lang.Object[] args)
RoutingSignalTargetRole.NO_DECISION means the method is not
a routing trigger for this signal (the signal abstains).resolve in interface RoutingSignalctx - the read/write splitting contextmethodName - the JDBC method being invokedargs - the method arguments (may be null)