public class GdbMonitoringConnectionPriority
extends java.lang.Object
Supported values:
strict-writer-primary — writer node in the primary regionstrict-reader-primary — reader node in the primary regionstrict-reader-secondary — reader node in any secondary regionstrict-writer-<region> — writer node in the specified region (e.g. strict-writer-us-east-1)strict-reader-<region> — reader node in the specified region (e.g. strict-reader-us-west-2)<region> — any node in the specified region (e.g. us-east-1)| Modifier and Type | Method and Description |
|---|---|
@Nullable HostSpec |
findMatchingHost(@NonNull java.util.List<HostSpec> hosts,
@Nullable java.lang.String primaryRegion,
@NonNull RdsUtils rdsUtils)
Finds the first host from the list that satisfies this priority.
|
java.util.List<HostSpec> |
findMatchingHosts(@NonNull java.util.List<HostSpec> hosts,
@Nullable java.lang.String primaryRegion,
@NonNull RdsUtils rdsUtils)
Finds all hosts from the list that satisfy this priority.
|
static @Nullable GdbMonitoringConnectionPriority |
fromValue(@Nullable java.lang.String value)
Parses a single priority value string.
|
@Nullable java.lang.String |
getRequiredRegion() |
@Nullable HostRole |
getRequiredRole() |
boolean |
isRequirePrimary() |
boolean |
isRequireSecondary() |
boolean |
isSatisfiedBy(@NonNull HostSpec host,
@Nullable java.lang.String primaryRegion,
@NonNull RdsUtils rdsUtils)
Checks if a given host satisfies this priority.
|
static java.util.List<GdbMonitoringConnectionPriority> |
parseList(@Nullable java.lang.String value)
Parses a comma-separated list of priority values.
|
java.lang.String |
toString() |
public static @Nullable GdbMonitoringConnectionPriority fromValue(@Nullable java.lang.String value)
value - the priority stringpublic static java.util.List<GdbMonitoringConnectionPriority> parseList(@Nullable java.lang.String value)
value - the comma-separated priority stringpublic boolean isSatisfiedBy(@NonNull HostSpec host, @Nullable java.lang.String primaryRegion, @NonNull RdsUtils rdsUtils)
host - the host to checkprimaryRegion - the current primary region of the global database (region where the writer is)rdsUtils - utility to extract region from hostpublic @Nullable HostSpec findMatchingHost(@NonNull java.util.List<HostSpec> hosts, @Nullable java.lang.String primaryRegion, @NonNull RdsUtils rdsUtils)
hosts - the available hostsprimaryRegion - the current primary regionrdsUtils - utility to extract region from hostpublic java.util.List<HostSpec> findMatchingHosts(@NonNull java.util.List<HostSpec> hosts, @Nullable java.lang.String primaryRegion, @NonNull RdsUtils rdsUtils)
hosts - the available hostsprimaryRegion - the current primary regionrdsUtils - utility to extract region from hostpublic @Nullable HostRole getRequiredRole()
public @Nullable java.lang.String getRequiredRegion()
public boolean isRequirePrimary()
public boolean isRequireSecondary()
public java.lang.String toString()
toString in class java.lang.Object