public class TopologyWriterResolver extends java.lang.Object implements WriterResolver
WriterResolver that connects to the writer identified from the cluster topology (set by
the TopologyRefresher before
this runs). Ports the legacy
ReadWriteSplittingPlugin.initializeWriterConnection connect step.| Constructor and Description |
|---|
TopologyWriterResolver() |
| Modifier and Type | Method and Description |
|---|---|
WriterResolution |
resolveWriter(RwSplitContext ctx)
Resolves the writer target.
|
public WriterResolution resolveWriter(RwSplitContext ctx) throws java.sql.SQLException
WriterResolverWriterResolution is either
WriterResolution.Kind.CONNECTED (a writer connection was established) or
WriterResolution.Kind.STAY (remain on the current reader connection, e.g. Global Write
Forwarding).resolveWriter in interface WriterResolverctx - the read/write splitting contextjava.sql.SQLException