public enum ReplicationStrategy extends Enum<ReplicationStrategy>
Enum Constant and Description |
---|
NETWORK_TOPOLOGY
With NetworkTopologyStrategy, for each datacenter, you can specify
how many replicas you want on a per-keyspace basis.
|
SIMPLE
SimpleStrategy merely places the first replica at the node whose
token is closest to the key (as determined by the Partitioner), and
additional replicas on subsequent nodes along the ring in increasing
Token order.
|
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
buildDefaultReplicationStrategy() |
static Map<String,Object> |
buildReplicationStrategy(CreateKeyspaceInput input) |
String |
getStrategyClass() |
static ReplicationStrategy |
lookup(String inputToMatch) |
static ReplicationStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReplicationStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReplicationStrategy SIMPLE
SimpleStrategy merely places the first replica at the node whose token is closest to the key (as determined by the Partitioner), and additional replicas on subsequent nodes along the ring in increasing Token order.
Supports a single strategy option 'replication_factor' that specifies the replication factor for the cluster.
public static final ReplicationStrategy NETWORK_TOPOLOGY
With NetworkTopologyStrategy, for each datacenter, you can specify how many replicas you want on a per-keyspace basis. Replicas are placed on different racks within each DC, if possible.
Supports strategy options which specify the replication factor for each datacenter. The replication factor for the entire cluster is the sum of all per datacenter values. Note that the datacenter names must match those used in conf/cassandra-topology.properties.
public static ReplicationStrategy[] values()
for (ReplicationStrategy c : ReplicationStrategy.values()) System.out.println(c);
public static ReplicationStrategy 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 String getStrategyClass()
public static ReplicationStrategy lookup(String inputToMatch)
public static Map<String,Object> buildReplicationStrategy(CreateKeyspaceInput input)
Copyright © 2010–2019. All rights reserved.