Class KeyspaceAttributes
java.lang.Object
org.springframework.data.cassandra.core.cql.keyspace.KeyspaceAttributes
Keyspace attributes.
- Author:
- Alex Shvid, Matthew T. Adams, Mark Paluch
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
static final long
static final KeyspaceOption.ReplicationStrategy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
long
newNetworkReplication
(DataCenterReplication... dataCenterReplications) Returns a map ofOption
s suitable as the value of aKeyspaceOption.REPLICATION
option with replication strategy class "NetworkTopologyStrategy" and with data centers each with their corresponding replication factors.Returns a map ofOption
s suitable as the value of aKeyspaceOption.REPLICATION
option with replication strategy class "SimpleStrategy" and with a replication factor of one.newSimpleReplication
(long replicationFactor) Returns a map ofOption
s suitable as the value of aKeyspaceOption.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)
-
Field Details
-
DEFAULT_REPLICATION_STRATEGY
-
DEFAULT_REPLICATION_FACTOR
public static final long DEFAULT_REPLICATION_FACTOR- See Also:
-
DEFAULT_DURABLE_WRITES
public static final boolean DEFAULT_DURABLE_WRITES- See Also:
-
-
Constructor Details
-
KeyspaceAttributes
public KeyspaceAttributes()
-
-
Method Details
-
newSimpleReplication
Returns a map ofOption
s suitable as the value of aKeyspaceOption.REPLICATION
option with replication strategy class "SimpleStrategy" and with a replication factor of one. -
newSimpleReplication
Returns a map ofOption
s suitable as the value of aKeyspaceOption.REPLICATION
option with replication strategy class "SimpleStrategy" and with a replication factor equal to that given. -
newNetworkReplication
public static Map<Option,Object> newNetworkReplication(DataCenterReplication... dataCenterReplications) Returns a map ofOption
s suitable as the value of aKeyspaceOption.REPLICATION
option with replication strategy class "NetworkTopologyStrategy" and with data centers each with their corresponding replication factors. -
getReplicationStrategy
-
setReplicationStrategy
-
getReplicationFactor
public long getReplicationFactor() -
setReplicationFactor
public void setReplicationFactor(long replicationFactor) -
getDurableWrites
public boolean getDurableWrites() -
setDurableWrites
public void setDurableWrites(boolean durableWrites)
-