public final class org.apache.cassandra.db.view.ViewUtils
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.db.view.ViewUtils
super_class: java.lang.Object
{
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/db/view/ViewUtils;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.apache.cassandra.db.view.ViewUtils.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/db/view/ViewUtils;
public static java.util.Optional<java.net.InetAddress> getViewNaturalEndpoint(java.lang.String, org.apache.cassandra.dht.Token, org.apache.cassandra.dht.Token);
descriptor: (Ljava/lang/String;Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/dht/Token;)Ljava/util/Optional;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokestatic org.apache.cassandra.db.Keyspace.open:(Ljava/lang/String;)Lorg/apache/cassandra/db/Keyspace;
invokevirtual org.apache.cassandra.db.Keyspace.getReplicationStrategy:()Lorg/apache/cassandra/locator/AbstractReplicationStrategy;
astore 3
start local 3 1: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getEndpointSnitch:()Lorg/apache/cassandra/locator/IEndpointSnitch;
invokestatic org.apache.cassandra.utils.FBUtilities.getBroadcastAddress:()Ljava/net/InetAddress;
invokeinterface org.apache.cassandra.locator.IEndpointSnitch.getDatacenter:(Ljava/net/InetAddress;)Ljava/lang/String;
astore 4
start local 4 2: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 5
start local 5 3: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 6
start local 6 4: aload 3
aload 1
invokevirtual org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints:(Lorg/apache/cassandra/dht/RingPosition;)Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
astore 8
goto 9
StackMap locals: java.lang.String org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token org.apache.cassandra.locator.AbstractReplicationStrategy java.lang.String java.util.List java.util.List top java.util.Iterator
StackMap stack:
5: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.net.InetAddress
astore 7
start local 7 6: aload 3
instanceof org.apache.cassandra.locator.NetworkTopologyStrategy
ifeq 8
7: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getEndpointSnitch:()Lorg/apache/cassandra/locator/IEndpointSnitch;
aload 7
invokeinterface org.apache.cassandra.locator.IEndpointSnitch.getDatacenter:(Ljava/net/InetAddress;)Ljava/lang/String;
aload 4
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 9
8: StackMap locals: java.lang.String org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token org.apache.cassandra.locator.AbstractReplicationStrategy java.lang.String java.util.List java.util.List java.net.InetAddress java.util.Iterator
StackMap stack:
aload 5
aload 7
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 7 9: StackMap locals: java.lang.String org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token org.apache.cassandra.locator.AbstractReplicationStrategy java.lang.String java.util.List java.util.List top java.util.Iterator
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
10: aload 3
aload 2
invokevirtual org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints:(Lorg/apache/cassandra/dht/RingPosition;)Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
astore 8
goto 19
StackMap locals:
StackMap stack:
11: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.net.InetAddress
astore 7
start local 7 12: aload 7
invokestatic org.apache.cassandra.utils.FBUtilities.getBroadcastAddress:()Ljava/net/InetAddress;
invokevirtual java.net.InetAddress.equals:(Ljava/lang/Object;)Z
ifeq 14
13: aload 7
invokestatic java.util.Optional.of:(Ljava/lang/Object;)Ljava/util/Optional;
areturn
14: StackMap locals: java.lang.String org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token org.apache.cassandra.locator.AbstractReplicationStrategy java.lang.String java.util.List java.util.List java.net.InetAddress java.util.Iterator
StackMap stack:
aload 5
aload 7
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
ifeq 16
15: aload 5
aload 7
invokeinterface java.util.List.remove:(Ljava/lang/Object;)Z
pop
goto 19
16: StackMap locals:
StackMap stack:
aload 3
instanceof org.apache.cassandra.locator.NetworkTopologyStrategy
ifeq 18
17: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getEndpointSnitch:()Lorg/apache/cassandra/locator/IEndpointSnitch;
aload 7
invokeinterface org.apache.cassandra.locator.IEndpointSnitch.getDatacenter:(Ljava/net/InetAddress;)Ljava/lang/String;
aload 4
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 19
18: StackMap locals:
StackMap stack:
aload 6
aload 7
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 7 19: StackMap locals: java.lang.String org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token org.apache.cassandra.locator.AbstractReplicationStrategy java.lang.String java.util.List java.util.List top java.util.Iterator
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 11
20: getstatic org.apache.cassandra.db.view.ViewUtils.$assertionsDisabled:Z
ifne 21
aload 5
invokeinterface java.util.List.size:()I
aload 6
invokeinterface java.util.List.size:()I
if_icmpeq 21
new java.lang.AssertionError
dup
ldc "Replication strategy should have the same number of endpoints for the base and the view"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
21: StackMap locals: java.lang.String org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token org.apache.cassandra.locator.AbstractReplicationStrategy java.lang.String java.util.List java.util.List
StackMap stack:
aload 5
invokestatic org.apache.cassandra.utils.FBUtilities.getBroadcastAddress:()Ljava/net/InetAddress;
invokeinterface java.util.List.indexOf:(Ljava/lang/Object;)I
istore 7
start local 7 22: iload 7
ifge 24
23: invokestatic java.util.Optional.empty:()Ljava/util/Optional;
areturn
24: StackMap locals: int
StackMap stack:
aload 6
iload 7
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.net.InetAddress
invokestatic java.util.Optional.of:(Ljava/lang/Object;)Ljava/util/Optional;
areturn
end local 7 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 25 0 keyspaceName Ljava/lang/String;
0 25 1 baseToken Lorg/apache/cassandra/dht/Token;
0 25 2 viewToken Lorg/apache/cassandra/dht/Token;
1 25 3 replicationStrategy Lorg/apache/cassandra/locator/AbstractReplicationStrategy;
2 25 4 localDataCenter Ljava/lang/String;
3 25 5 baseEndpoints Ljava/util/List<Ljava/net/InetAddress;>;
4 25 6 viewEndpoints Ljava/util/List<Ljava/net/InetAddress;>;
6 9 7 baseEndpoint Ljava/net/InetAddress;
12 19 7 viewEndpoint Ljava/net/InetAddress;
22 25 7 baseIdx I
Signature: (Ljava/lang/String;Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/dht/Token;)Ljava/util/Optional<Ljava/net/InetAddress;>;
MethodParameters:
Name Flags
keyspaceName
baseToken
viewToken
}
SourceFile: "ViewUtils.java"