public class KeyspaceMetadata extends Object
Modifier and Type | Method and Description |
---|---|
String |
asCQLQuery()
Returns a CQL query representing this keyspace.
|
String |
exportAsString()
Returns a
String containing CQL queries representing this
keyspace and the table it contains. |
String |
getName()
Returns the name of this keyspace.
|
Map<String,String> |
getReplication()
Returns the replication options for this keyspace.
|
TableMetadata |
getTable(String name)
Returns the metadata for a table contained in this keyspace.
|
Collection<TableMetadata> |
getTables()
Returns the tables defined in this keyspace.
|
boolean |
isDurableWrites()
Returns whether durable writes are set on this keyspace.
|
public static final String KS_NAME
public String getName()
public boolean isDurableWrites()
true
if durable writes are set on this keyspace (the
default), false
otherwise.public Map<String,String> getReplication()
public TableMetadata getTable(String name)
name
- the name of table to retrievename
in this keyspace if it
exists, false
otherwise.public Collection<TableMetadata> getTables()
public String exportAsString()
String
containing CQL queries representing this
keyspace and the table it contains.
In other words, this method returns the queries that would allow to
recreate the schema of this keyspace, along with all its table.
Note that the returned String is formatted to be human readable (for
some definition of human readable at least).public String asCQLQuery()
exportAsString()
Copyright © 2014. All Rights Reserved.