public enum HostRequirement extends Enum<HostRequirement>
Enum Constant and Description |
---|
any |
master |
preferSecondary |
secondary |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
allowConnectingTo(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
public static final HostRequirement master
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(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 existint 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
targetServerType
- the value of targetServerType
connection propertyCopyright © 2019 PostgreSQL Global Development Group. All rights reserved.