Package org.apache.cassandra.schema
Class KeyspaceParams
- java.lang.Object
-
- org.apache.cassandra.schema.KeyspaceParams
-
public final class KeyspaceParams extends java.lang.Object
An immutable class representing keyspace parameters (durability and replication).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KeyspaceParams.Option
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_DURABLE_WRITES
static boolean
DEFAULT_LOCAL_DURABLE_WRITES
This determines durable writes for theSchemaConstants.SCHEMA_KEYSPACE_NAME
andSchemaConstants.SYSTEM_KEYSPACE_NAME
keyspaces, the only reason it is not final is for commitlog unit tests.boolean
durableWrites
ReplicationParams
replication
-
Constructor Summary
Constructors Constructor Description KeyspaceParams(boolean durableWrites, ReplicationParams replication)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeyspaceParams
create(boolean durableWrites, java.util.Map<java.lang.String,java.lang.String> replication)
boolean
equals(java.lang.Object o)
int
hashCode()
static KeyspaceParams
local()
static KeyspaceParams
nts(java.lang.Object... args)
static KeyspaceParams
simple(int replicationFactor)
static KeyspaceParams
simple(java.lang.String replicationFactor)
static KeyspaceParams
simpleTransient(int replicationFactor)
java.lang.String
toString()
void
validate(java.lang.String name)
-
-
-
Field Detail
-
DEFAULT_DURABLE_WRITES
public static final boolean DEFAULT_DURABLE_WRITES
- See Also:
- Constant Field Values
-
DEFAULT_LOCAL_DURABLE_WRITES
public static boolean DEFAULT_LOCAL_DURABLE_WRITES
This determines durable writes for theSchemaConstants.SCHEMA_KEYSPACE_NAME
andSchemaConstants.SYSTEM_KEYSPACE_NAME
keyspaces, the only reason it is not final is for commitlog unit tests. It should only be changed for testing purposes.
-
durableWrites
public final boolean durableWrites
-
replication
public final ReplicationParams replication
-
-
Constructor Detail
-
KeyspaceParams
public KeyspaceParams(boolean durableWrites, ReplicationParams replication)
-
-
Method Detail
-
create
public static KeyspaceParams create(boolean durableWrites, java.util.Map<java.lang.String,java.lang.String> replication)
-
local
public static KeyspaceParams local()
-
simple
public static KeyspaceParams simple(int replicationFactor)
-
simple
public static KeyspaceParams simple(java.lang.String replicationFactor)
-
simpleTransient
public static KeyspaceParams simpleTransient(int replicationFactor)
-
nts
public static KeyspaceParams nts(java.lang.Object... args)
-
validate
public void validate(java.lang.String name)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-