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.
|
PREFER_RACK
Try node on the same rack as the client first.
|
RANDOM
Distribute reads and writes 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
public static final Replica SEQUENCE
public static final Replica PREFER_RACK
ClientPolicy.rackAware, ClientPolicy.rackId, and server rack
configuration must also be set to enable this functionality.
public static final Replica RANDOM
This option is useful on reads when the replication factor equals the number of nodes in the cluster and the overhead of requesting proles is not desired.
This option could temporarily be useful on writes when the client can't connect to a node, but that node is reachable via a proxy from a different node.
This option can also be used to test server proxies.
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–2025 Aerospike, Inc. All rights reserved.