public class org.apache.cassandra.locator.SimpleStrategy extends org.apache.cassandra.locator.AbstractReplicationStrategy
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.locator.SimpleStrategy
super_class: org.apache.cassandra.locator.AbstractReplicationStrategy
{
public void <init>(java.lang.String, org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.locator.IEndpointSnitch, java.util.Map<java.lang.String, java.lang.String>);
descriptor: (Ljava/lang/String;Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/IEndpointSnitch;Ljava/util/Map;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, 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
aload 2
aload 3
aload 4
invokespecial org.apache.cassandra.locator.AbstractReplicationStrategy.<init>:(Ljava/lang/String;Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/IEndpointSnitch;Ljava/util/Map;)V
1: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/locator/SimpleStrategy;
0 2 1 keyspaceName Ljava/lang/String;
0 2 2 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 2 3 snitch Lorg/apache/cassandra/locator/IEndpointSnitch;
0 2 4 configOptions Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
Signature: (Ljava/lang/String;Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/IEndpointSnitch;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;)V
MethodParameters:
Name Flags
keyspaceName
tokenMetadata
snitch
configOptions
public java.util.List<java.net.InetAddress> calculateNaturalEndpoints(org.apache.cassandra.dht.Token, org.apache.cassandra.locator.TokenMetadata);
descriptor: (Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/locator/TokenMetadata;)Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.apache.cassandra.locator.SimpleStrategy.getReplicationFactor:()I
istore 3
start local 3 1: aload 2
invokevirtual org.apache.cassandra.locator.TokenMetadata.sortedTokens:()Ljava/util/ArrayList;
astore 4
start local 4 2: new java.util.ArrayList
dup
iload 3
invokespecial java.util.ArrayList.<init>:(I)V
astore 5
start local 5 3: aload 4
invokevirtual java.util.ArrayList.isEmpty:()Z
ifeq 5
4: aload 5
areturn
5: StackMap locals: int java.util.ArrayList java.util.List
StackMap stack:
aload 4
aload 1
iconst_0
invokestatic org.apache.cassandra.locator.TokenMetadata.ringIterator:(Ljava/util/ArrayList;Lorg/apache/cassandra/dht/Token;Z)Ljava/util/Iterator;
astore 6
start local 6 6: goto 10
7: StackMap locals: java.util.Iterator
StackMap stack:
aload 2
aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.dht.Token
invokevirtual org.apache.cassandra.locator.TokenMetadata.getEndpoint:(Lorg/apache/cassandra/dht/Token;)Ljava/net/InetAddress;
astore 7
start local 7 8: aload 5
aload 7
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
ifne 10
9: aload 5
aload 7
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 7 10: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.List.size:()I
iload 3
if_icmpge 11
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 7
11: StackMap locals:
StackMap stack:
aload 5
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/apache/cassandra/locator/SimpleStrategy;
0 12 1 token Lorg/apache/cassandra/dht/Token;
0 12 2 metadata Lorg/apache/cassandra/locator/TokenMetadata;
1 12 3 replicas I
2 12 4 tokens Ljava/util/ArrayList<Lorg/apache/cassandra/dht/Token;>;
3 12 5 endpoints Ljava/util/List<Ljava/net/InetAddress;>;
6 12 6 iter Ljava/util/Iterator<Lorg/apache/cassandra/dht/Token;>;
8 10 7 ep Ljava/net/InetAddress;
Signature: (Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/locator/TokenMetadata;)Ljava/util/List<Ljava/net/InetAddress;>;
MethodParameters:
Name Flags
token
metadata
public int getReplicationFactor();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.locator.SimpleStrategy.configOptions:Ljava/util/Map;
ldc "replication_factor"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/locator/SimpleStrategy;
public void validateOptions();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.locator.SimpleStrategy.configOptions:Ljava/util/Map;
ldc "replication_factor"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 1
start local 1 1: aload 1
ifnonnull 3
2: new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "SimpleStrategy requires a replication_factor strategy option."
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.lang.String
StackMap stack:
aload 0
aload 1
invokevirtual org.apache.cassandra.locator.SimpleStrategy.validateReplicationFactor:(Ljava/lang/String;)V
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/locator/SimpleStrategy;
1 5 1 rf Ljava/lang/String;
Exceptions:
throws org.apache.cassandra.exceptions.ConfigurationException
public java.util.Collection<java.lang.String> recognizedOptions();
descriptor: ()Ljava/util/Collection;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: ldc "replication_factor"
invokestatic java.util.Collections.singleton:(Ljava/lang/Object;)Ljava/util/Set;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/locator/SimpleStrategy;
Signature: ()Ljava/util/Collection<Ljava/lang/String;>;
}
SourceFile: "SimpleStrategy.java"