public enum FailoverBehavior extends Enum<FailoverBehavior>
Enum Constant and Description |
---|
ALLOW_READS_FROM_SECONDARIES
Allow to read from the secondary server(s), but immediately fail writes
to the secondary server(s).
|
ALLOW_READS_FROM_SECONDARIES_AND_WRITES_TO_SECONDARIES
Allow to read from the secondary server(s), and allow writes to the secondary server(s).
|
FAIL_IMMEDIATELY
Immediately fail the request, without attempting any failover.
|
READ_FROM_ALL_SERVERS
Read requests will be spread across all the servers, instead of doing all the work against the master.
|
Modifier and Type | Method and Description |
---|---|
int |
getValue() |
static FailoverBehavior |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FailoverBehavior[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FailoverBehavior ALLOW_READS_FROM_SECONDARIES
public static final FailoverBehavior ALLOW_READS_FROM_SECONDARIES_AND_WRITES_TO_SECONDARIES
public static final FailoverBehavior FAIL_IMMEDIATELY
public static final FailoverBehavior READ_FROM_ALL_SERVERS
public static FailoverBehavior[] values()
for (FailoverBehavior c : FailoverBehavior.values()) System.out.println(c);
public static FailoverBehavior 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 int getValue()
Copyright © 2016. All Rights Reserved.