public enum Replica extends Enum<Replica>
Enum Constant and Description |
---|
MASTER
Use node containing key's master partition.
|
MASTER_PROLES
Distribute reads across nodes containing key's master and replicated partitions
in round-robin fashion.
|
RANDOM
Distribute reads across all nodes in cluster in round-robin fashion.
|
SEQUENCE
Try node containing master partition first.
|
Modifier and Type | Method and Description |
---|---|
static Replica |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Replica[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Replica MASTER
public static final Replica MASTER_PROLES
This option requires ClientPolicy.requestProleReplicas
to be enabled
in order to function properly.
public static final Replica SEQUENCE
This option requires ClientPolicy.requestProleReplicas
to be enabled
in order to function properly.
public static final Replica RANDOM
This option is useful when the replication factor equals the number of nodes in the cluster and the overhead of requesting proles is not desired.
public static Replica[] values()
for (Replica c : Replica.values()) System.out.println(c);
public static Replica 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 nullCopyright ? 2012–2018 Aerospike, Inc. All rights reserved.