public class org.apache.cassandra.cql3.statements.CreateTriggerStatement 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.CreateTriggerStatement
super_class: org.apache.cassandra.cql3.statements.SchemaAlteringStatement
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.lang.String triggerName;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String triggerClass;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean ifNotExists;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/cql3/statements/CreateTriggerStatement;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.cql3.statements.CreateTriggerStatement.logger:Lorg/slf4j/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(org.apache.cassandra.cql3.CFName, java.lang.String, java.lang.String, boolean);
descriptor: (Lorg/apache/cassandra/cql3/CFName;Ljava/lang/String;Ljava/lang/String;Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
aload 1
invokespecial org.apache.cassandra.cql3.statements.SchemaAlteringStatement.<init>:(Lorg/apache/cassandra/cql3/CFName;)V
1: aload 0
aload 2
putfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerName:Ljava/lang/String;
2: aload 0
aload 3
putfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerClass:Ljava/lang/String;
3: aload 0
iload 4
putfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.ifNotExists:Z
4: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/cql3/statements/CreateTriggerStatement;
0 5 1 name Lorg/apache/cassandra/cql3/CFName;
0 5 2 triggerName Ljava/lang/String;
0 5 3 clazz Ljava/lang/String;
0 5 4 ifNotExists Z
MethodParameters:
Name Flags
name
triggerName
clazz
ifNotExists
public void checkAccess(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ldc "Only superusers are allowed to perform CREATE TRIGGER queries"
invokevirtual org.apache.cassandra.service.ClientState.ensureIsSuper:(Ljava/lang/String;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/cql3/statements/CreateTriggerStatement;
0 2 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.UnauthorizedException
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=7, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.apache.cassandra.cql3.statements.CreateTriggerStatement.keyspace:()Ljava/lang/String;
aload 0
invokevirtual org.apache.cassandra.cql3.statements.CreateTriggerStatement.columnFamily:()Ljava/lang/String;
invokestatic org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/config/CFMetaData;
astore 2
start local 2 1: aload 2
invokevirtual org.apache.cassandra.config.CFMetaData.isView:()Z
ifeq 3
2: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Cannot CREATE TRIGGER against a materialized view"
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: org.apache.cassandra.config.CFMetaData
StackMap stack:
getstatic org.apache.cassandra.triggers.TriggerExecutor.instance:Lorg/apache/cassandra/triggers/TriggerExecutor;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerClass:Ljava/lang/String;
invokevirtual org.apache.cassandra.triggers.TriggerExecutor.loadTriggerInstance:(Ljava/lang/String;)Lorg/apache/cassandra/triggers/ITrigger;
pop
4: goto 7
5: StackMap locals:
StackMap stack: java.lang.Exception
pop
6: new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "Trigger class '%s' doesn't exist"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerClass:Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/cassandra/cql3/statements/CreateTriggerStatement;
0 8 1 state Lorg/apache/cassandra/service/ClientState;
1 8 2 cfm Lorg/apache/cassandra/config/CFMetaData;
Exception table:
from to target type
3 4 5 Class java.lang.Exception
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=7, 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
invokevirtual org.apache.cassandra.cql3.statements.CreateTriggerStatement.keyspace:()Ljava/lang/String;
aload 0
invokevirtual org.apache.cassandra.cql3.statements.CreateTriggerStatement.columnFamily:()Ljava/lang/String;
invokevirtual org.apache.cassandra.config.Schema.getCFMetaData:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/config/CFMetaData;
invokevirtual org.apache.cassandra.config.CFMetaData.copy:()Lorg/apache/cassandra/config/CFMetaData;
astore 3
start local 3 1: aload 3
invokevirtual org.apache.cassandra.config.CFMetaData.getTriggers:()Lorg/apache/cassandra/schema/Triggers;
astore 4
start local 4 2: aload 4
aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerName:Ljava/lang/String;
invokevirtual org.apache.cassandra.schema.Triggers.get:(Ljava/lang/String;)Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
ifeq 6
3: aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.ifNotExists:Z
ifeq 5
4: aconst_null
areturn
5: StackMap locals: org.apache.cassandra.config.CFMetaData org.apache.cassandra.schema.Triggers
StackMap stack:
new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Trigger %s already exists"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerName:Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 3
aload 4
aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerName:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerClass:Ljava/lang/String;
invokestatic org.apache.cassandra.schema.TriggerMetadata.create:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/schema/TriggerMetadata;
invokevirtual org.apache.cassandra.schema.Triggers.with:(Lorg/apache/cassandra/schema/TriggerMetadata;)Lorg/apache/cassandra/schema/Triggers;
invokevirtual org.apache.cassandra.config.CFMetaData.triggers:(Lorg/apache/cassandra/schema/Triggers;)Lorg/apache/cassandra/config/CFMetaData;
pop
7: getstatic org.apache.cassandra.cql3.statements.CreateTriggerStatement.logger:Lorg/slf4j/Logger;
ldc "Adding trigger with name {} and class {}"
aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerName:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateTriggerStatement.triggerClass:Ljava/lang/String;
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
8: aload 3
iload 2
invokestatic org.apache.cassandra.service.MigrationManager.announceColumnFamilyUpdate:(Lorg/apache/cassandra/config/CFMetaData;Z)V
9: new org.apache.cassandra.transport.Event$SchemaChange
dup
getstatic org.apache.cassandra.transport.Event$SchemaChange$Change.UPDATED:Lorg/apache/cassandra/transport/Event$SchemaChange$Change;
getstatic org.apache.cassandra.transport.Event$SchemaChange$Target.TABLE:Lorg/apache/cassandra/transport/Event$SchemaChange$Target;
aload 0
invokevirtual org.apache.cassandra.cql3.statements.CreateTriggerStatement.keyspace:()Ljava/lang/String;
aload 0
invokevirtual org.apache.cassandra.cql3.statements.CreateTriggerStatement.columnFamily:()Ljava/lang/String;
invokespecial org.apache.cassandra.transport.Event$SchemaChange.<init>:(Lorg/apache/cassandra/transport/Event$SchemaChange$Change;Lorg/apache/cassandra/transport/Event$SchemaChange$Target;Ljava/lang/String;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 10 0 this Lorg/apache/cassandra/cql3/statements/CreateTriggerStatement;
0 10 1 queryState Lorg/apache/cassandra/service/QueryState;
0 10 2 isLocalOnly Z
1 10 3 cfm Lorg/apache/cassandra/config/CFMetaData;
2 10 4 triggers Lorg/apache/cassandra/schema/Triggers;
Exceptions:
throws org.apache.cassandra.exceptions.ConfigurationException, org.apache.cassandra.exceptions.InvalidRequestException
MethodParameters:
Name Flags
queryState
isLocalOnly
}
SourceFile: "CreateTriggerStatement.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
public final Target = org.apache.cassandra.transport.Event$SchemaChange$Target of org.apache.cassandra.transport.Event$SchemaChange