public class GdbWriterResolver extends java.lang.Object implements WriterResolver
WriterResolver for Global Database: enforces accessible-region and home-region rules,
and returns WriterResolution.stay() for an out-of-home-region writer when Global Write
Forwarding is enabled. Otherwise delegates to a topology writer resolver. Ports the legacy
GdbReadWriteSplittingPlugin.initializeWriterConnection.| Constructor and Description |
|---|
GdbWriterResolver(GdbSettings settings,
WriterResolver delegate) |
| Modifier and Type | Method and Description |
|---|---|
WriterResolution |
resolveWriter(RwSplitContext ctx)
Resolves the writer target.
|
public GdbWriterResolver(GdbSettings settings, WriterResolver delegate)
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