org.apache.cassandra.cql3.statements
Class CreateKeyspaceStatement
java.lang.Object
org.apache.cassandra.cql3.statements.ParsedStatement
org.apache.cassandra.cql3.statements.CFStatement
org.apache.cassandra.cql3.statements.SchemaAlteringStatement
org.apache.cassandra.cql3.statements.CreateKeyspaceStatement
- All Implemented Interfaces:
- CQLStatement
public class CreateKeyspaceStatement
- extends SchemaAlteringStatement
A CREATE KEYSPACE statement parsed from a CQL query.
|
Constructor Summary |
CreateKeyspaceStatement(java.lang.String name,
KSPropDefs attrs)
Creates a new CreateKeyspaceStatement instance for a given
keyspace name and keyword arguments. |
|
Method Summary |
void |
announceMigration()
|
void |
checkAccess(ClientState state)
Perform any access verification necessary for the statement. |
void |
validate(ClientState state)
The CqlParser only goes as far as extracting the keyword arguments
from these statements, so this method is responsible for processing and
validating. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreateKeyspaceStatement
public CreateKeyspaceStatement(java.lang.String name,
KSPropDefs attrs)
- Creates a new
CreateKeyspaceStatement instance for a given
keyspace name and keyword arguments.
- Parameters:
name - the name of the keyspace to createattrs - map of the raw keyword arguments that followed the WITH keyword.
checkAccess
public void checkAccess(ClientState state)
throws InvalidRequestException
- Description copied from interface:
CQLStatement
- Perform any access verification necessary for the statement.
- Parameters:
state - the current client state
- Throws:
InvalidRequestException
validate
public void validate(ClientState state)
throws InvalidRequestException,
SchemaDisagreementException
- The
CqlParser only goes as far as extracting the keyword arguments
from these statements, so this method is responsible for processing and
validating.
- Specified by:
validate in interface CQLStatement- Overrides:
validate in class SchemaAlteringStatement
- Parameters:
state - the current client state
- Throws:
InvalidRequestException - if arguments are missing or unacceptable
SchemaDisagreementException
announceMigration
public void announceMigration()
throws InvalidRequestException,
ConfigurationException
- Specified by:
announceMigration in class SchemaAlteringStatement
- Throws:
InvalidRequestException
ConfigurationException
Copyright © 2013 The Apache Software Foundation