public enum HostRequirement extends Enum<HostRequirement>
Enum Constant and Description |
---|
any |
master
Deprecated.
we no longer use the terms master or slave in the driver, or the PostgreSQL
project.
|
preferSecondary |
primary |
secondary |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
allowConnectingTo(@Nullable HostStatus status) |
static HostRequirement |
getTargetServerType(String targetServerType)
The postgreSQL project has decided not to use the term slave to refer to alternate servers.
|
static HostRequirement |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HostRequirement[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HostRequirement any
@Deprecated public static final HostRequirement master
public static final HostRequirement primary
public static final HostRequirement secondary
public static final HostRequirement preferSecondary
public static HostRequirement[] values()
for (HostRequirement c : HostRequirement.values()) System.out.println(c);
public static HostRequirement valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract boolean allowConnectingTo(@Nullable HostStatus status)
public static HostRequirement getTargetServerType(String targetServerType)
The postgreSQL project has decided not to use the term slave to refer to alternate servers. secondary or standby is preferred. We have arbitrarily chosen secondary. As of Jan 2018 in order not to break existing code we are going to accept both slave or secondary for names of alternate servers.
The current policy is to keep accepting this silently but not document slave, or slave preferSlave
As of Jul 2018 silently deprecate the use of the word master as well
targetServerType
- the value of targetServerType
connection propertyCopyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.