public class org.apache.cassandra.cql3.statements.AlterKeyspaceStatement extends org.apache.cassandra.cql3.statements.SchemaAlteringStatement
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.cql3.statements.AlterKeyspaceStatement
super_class: org.apache.cassandra.cql3.statements.SchemaAlteringStatement
{
private final java.lang.String name;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.apache.cassandra.cql3.statements.KeyspaceAttributes attrs;
descriptor: Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(java.lang.String, org.apache.cassandra.cql3.statements.KeyspaceAttributes);
descriptor: (Ljava/lang/String;Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial org.apache.cassandra.cql3.statements.SchemaAlteringStatement.<init>:()V
1: aload 0
aload 1
putfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.name:Ljava/lang/String;
2: aload 0
aload 2
putfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/cql3/statements/AlterKeyspaceStatement;
0 4 1 name Ljava/lang/String;
0 4 2 attrs Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
MethodParameters:
Name Flags
name
attrs
public java.lang.String keyspace();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.name:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/cql3/statements/AlterKeyspaceStatement;
public void checkAccess(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.name:Ljava/lang/String;
getstatic org.apache.cassandra.auth.Permission.ALTER:Lorg/apache/cassandra/auth/Permission;
invokevirtual org.apache.cassandra.service.ClientState.hasKeyspaceAccess:(Ljava/lang/String;Lorg/apache/cassandra/auth/Permission;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/cql3/statements/AlterKeyspaceStatement;
0 2 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.UnauthorizedException, org.apache.cassandra.exceptions.InvalidRequestException
MethodParameters:
Name Flags
state
public void validate(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.name:Ljava/lang/String;
invokevirtual org.apache.cassandra.config.Schema.getKSMetaData:(Ljava/lang/String;)Lorg/apache/cassandra/schema/KeyspaceMetadata;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: new org.apache.cassandra.exceptions.InvalidRequestException
dup
new java.lang.StringBuilder
dup
ldc "Unknown keyspace "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.name:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: org.apache.cassandra.schema.KeyspaceMetadata
StackMap stack:
aload 2
getfield org.apache.cassandra.schema.KeyspaceMetadata.name:Ljava/lang/String;
invokestatic org.apache.cassandra.config.SchemaConstants.isLocalSystemKeyspace:(Ljava/lang/String;)Z
ifeq 5
4: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Cannot alter system keyspace"
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.validate:()V
6: aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.getReplicationStrategyClass:()Ljava/lang/String;
ifnonnull 8
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.getReplicationOptions:()Ljava/util/Map;
invokeinterface java.util.Map.isEmpty:()Z
ifne 8
7: new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "Missing replication strategy class"
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.getReplicationStrategyClass:()Ljava/lang/String;
ifnull 13
9: aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
aload 2
getfield org.apache.cassandra.schema.KeyspaceMetadata.params:Lorg/apache/cassandra/schema/KeyspaceParams;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.asAlteredKeyspaceParams:(Lorg/apache/cassandra/schema/KeyspaceParams;)Lorg/apache/cassandra/schema/KeyspaceParams;
astore 3
start local 3 10: aload 3
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.name:Ljava/lang/String;
invokevirtual org.apache.cassandra.schema.KeyspaceParams.validate:(Ljava/lang/String;)V
11: aload 3
getfield org.apache.cassandra.schema.KeyspaceParams.replication:Lorg/apache/cassandra/schema/ReplicationParams;
getfield org.apache.cassandra.schema.ReplicationParams.klass:Ljava/lang/Class;
ldc Lorg/apache/cassandra/locator/LocalStrategy;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 13
12: new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "Unable to use given strategy class: LocalStrategy is reserved for internal use."
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
end local 3 13: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/apache/cassandra/cql3/statements/AlterKeyspaceStatement;
0 14 1 state Lorg/apache/cassandra/service/ClientState;
1 14 2 ksm Lorg/apache/cassandra/schema/KeyspaceMetadata;
10 13 3 params Lorg/apache/cassandra/schema/KeyspaceParams;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException
MethodParameters:
Name Flags
state
public org.apache.cassandra.transport.Event$SchemaChange announceMigration(org.apache.cassandra.service.QueryState, boolean);
descriptor: (Lorg/apache/cassandra/service/QueryState;Z)Lorg/apache/cassandra/transport/Event$SchemaChange;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.name:Ljava/lang/String;
invokevirtual org.apache.cassandra.config.Schema.getKSMetaData:(Ljava/lang/String;)Lorg/apache/cassandra/schema/KeyspaceMetadata;
astore 3
start local 3 1: aload 3
ifnonnull 3
2: new org.apache.cassandra.exceptions.InvalidRequestException
dup
new java.lang.StringBuilder
dup
ldc "Unknown keyspace "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.name:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: org.apache.cassandra.schema.KeyspaceMetadata
StackMap stack:
aload 3
aload 0
getfield org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
aload 3
getfield org.apache.cassandra.schema.KeyspaceMetadata.params:Lorg/apache/cassandra/schema/KeyspaceParams;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.asAlteredKeyspaceParams:(Lorg/apache/cassandra/schema/KeyspaceParams;)Lorg/apache/cassandra/schema/KeyspaceParams;
invokevirtual org.apache.cassandra.schema.KeyspaceMetadata.withSwapped:(Lorg/apache/cassandra/schema/KeyspaceParams;)Lorg/apache/cassandra/schema/KeyspaceMetadata;
astore 4
start local 4 4: aload 4
iload 2
invokestatic org.apache.cassandra.service.MigrationManager.announceKeyspaceUpdate:(Lorg/apache/cassandra/schema/KeyspaceMetadata;Z)V
5: new org.apache.cassandra.transport.Event$SchemaChange
dup
getstatic org.apache.cassandra.transport.Event$SchemaChange$Change.UPDATED:Lorg/apache/cassandra/transport/Event$SchemaChange$Change;
aload 0
invokevirtual org.apache.cassandra.cql3.statements.AlterKeyspaceStatement.keyspace:()Ljava/lang/String;
invokespecial org.apache.cassandra.transport.Event$SchemaChange.<init>:(Lorg/apache/cassandra/transport/Event$SchemaChange$Change;Ljava/lang/String;)V
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/cql3/statements/AlterKeyspaceStatement;
0 6 1 queryState Lorg/apache/cassandra/service/QueryState;
0 6 2 isLocalOnly Z
1 6 3 oldKsm Lorg/apache/cassandra/schema/KeyspaceMetadata;
4 6 4 newKsm Lorg/apache/cassandra/schema/KeyspaceMetadata;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException
MethodParameters:
Name Flags
queryState
isLocalOnly
}
SourceFile: "AlterKeyspaceStatement.java"
InnerClasses:
public SchemaChange = org.apache.cassandra.transport.Event$SchemaChange of org.apache.cassandra.transport.Event
public final Change = org.apache.cassandra.transport.Event$SchemaChange$Change of org.apache.cassandra.transport.Event$SchemaChange