public enum Preference extends java.lang.Enum<Preference>
Enum Constant and Description |
---|
LOCAL
Route to local node, if possible
|
ONLY_LOCAL
Route to the local shard only
|
ONLY_NODE
Route to specific node only
|
ONLY_NODES
Route to only node with attribute
|
PREFER_NODE
Route to preferred node, if possible
|
PRIMARY
Route to primary shards
|
PRIMARY_FIRST
Route to primary shards first
|
REPLICA
Route to replica shards
|
REPLICA_FIRST
Route to replica shards first
|
SHARDS
Route to specific shards
|
Modifier and Type | Method and Description |
---|---|
static Preference |
parse(java.lang.String preference)
Parses the Preference Type given a string
|
java.lang.String |
type() |
static Preference |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Preference[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Preference SHARDS
public static final Preference PREFER_NODE
public static final Preference LOCAL
public static final Preference PRIMARY
public static final Preference REPLICA
public static final Preference PRIMARY_FIRST
public static final Preference REPLICA_FIRST
public static final Preference ONLY_LOCAL
public static final Preference ONLY_NODE
public static final Preference ONLY_NODES
public static Preference[] values()
for (Preference c : Preference.values()) System.out.println(c);
public static Preference valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String type()
public static Preference parse(java.lang.String preference)