public class KeyspaceAttributes extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_DURABLE_WRITES |
static long |
DEFAULT_REPLICATION_FACTOR |
static KeyspaceOption.ReplicationStrategy |
DEFAULT_REPLICATION_STRATEGY |
Constructor and Description |
---|
KeyspaceAttributes() |
Modifier and Type | Method and Description |
---|---|
boolean |
getDurableWrites() |
long |
getReplicationFactor() |
KeyspaceOption.ReplicationStrategy |
getReplicationStrategy() |
static Map<Option,Object> |
newNetworkReplication(DataCenterReplication... dataCenterReplications)
Returns a map of
Option s suitable as the value of a KeyspaceOption.REPLICATION option with
replication strategy class "NetworkTopologyStrategy" and with data centers each with their corresponding
replication factors. |
static Map<Option,Object> |
newSimpleReplication()
Returns a map of
Option s suitable as the value of a KeyspaceOption.REPLICATION option with
replication strategy class "SimpleStrategy" and with a replication factor of one. |
static Map<Option,Object> |
newSimpleReplication(long replicationFactor)
Returns a map of
Option s suitable as the value of a KeyspaceOption.REPLICATION option with
replication strategy class "SimpleStrategy" and with a replication factor equal to that given. |
void |
setDurableWrites(boolean durableWrites) |
void |
setReplicationFactor(long replicationFactor) |
void |
setReplicationStrategy(KeyspaceOption.ReplicationStrategy replicationStrategy) |
public static final KeyspaceOption.ReplicationStrategy DEFAULT_REPLICATION_STRATEGY
public static final long DEFAULT_REPLICATION_FACTOR
public static final boolean DEFAULT_DURABLE_WRITES
public static Map<Option,Object> newSimpleReplication()
Option
s suitable as the value of a KeyspaceOption.REPLICATION
option with
replication strategy class "SimpleStrategy" and with a replication factor of one.public static Map<Option,Object> newSimpleReplication(long replicationFactor)
Option
s suitable as the value of a KeyspaceOption.REPLICATION
option with
replication strategy class "SimpleStrategy" and with a replication factor equal to that given.public static Map<Option,Object> newNetworkReplication(DataCenterReplication... dataCenterReplications)
Option
s suitable as the value of a KeyspaceOption.REPLICATION
option with
replication strategy class "NetworkTopologyStrategy" and with data centers each with their corresponding
replication factors.public KeyspaceOption.ReplicationStrategy getReplicationStrategy()
public void setReplicationStrategy(KeyspaceOption.ReplicationStrategy replicationStrategy)
public long getReplicationFactor()
public void setReplicationFactor(long replicationFactor)
public boolean getDurableWrites()
public void setDurableWrites(boolean durableWrites)
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.