final class org.apache.cassandra.transport.ConnectionLimitHandler extends io.netty.channel.ChannelInboundHandlerAdapter
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.transport.ConnectionLimitHandler
super_class: io.netty.channel.ChannelInboundHandlerAdapter
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.util.concurrent.ConcurrentMap<java.net.InetAddress, java.util.concurrent.atomic.AtomicLong> connectionsPerClient;
descriptor: Ljava/util/concurrent/ConcurrentMap;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentMap<Ljava/net/InetAddress;Ljava/util/concurrent/atomic/AtomicLong;>;
private final java.util.concurrent.atomic.AtomicLong counter;
descriptor: Ljava/util/concurrent/atomic/AtomicLong;
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/transport/ConnectionLimitHandler;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.transport.ConnectionLimitHandler.logger:Lorg/slf4j/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
invokespecial io.netty.channel.ChannelInboundHandlerAdapter.<init>:()V
1: aload 0
new java.util.concurrent.ConcurrentHashMap
dup
invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
putfield org.apache.cassandra.transport.ConnectionLimitHandler.connectionsPerClient:Ljava/util/concurrent/ConcurrentMap;
2: aload 0
new java.util.concurrent.atomic.AtomicLong
dup
lconst_0
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:(J)V
putfield org.apache.cassandra.transport.ConnectionLimitHandler.counter:Ljava/util/concurrent/atomic/AtomicLong;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/transport/ConnectionLimitHandler;
public void channelActive(io.netty.channel.ChannelHandlerContext);
descriptor: (Lio/netty/channel/ChannelHandlerContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=11, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.transport.ConnectionLimitHandler.counter:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.incrementAndGet:()J
lstore 2
start local 2 1: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getNativeTransportMaxConcurrentConnections:()J
lstore 4
start local 4 2: lload 4
lconst_0
lcmp
ifge 4
3: ldc 9223372036854775807
lstore 4
4: StackMap locals: long long
StackMap stack:
lload 2
lload 4
lcmp
ifle 8
5: getstatic org.apache.cassandra.transport.ConnectionLimitHandler.logger:Lorg/slf4j/Logger;
ldc "Exceeded maximum native connection limit of {} by using {} connections"
lload 4
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
lload 2
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
6: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.close:()Lio/netty/channel/ChannelFuture;
pop
7: goto 22
8: StackMap locals:
StackMap stack:
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getNativeTransportMaxConcurrentConnectionsPerIp:()J
lstore 6
start local 6 9: lload 6
lconst_0
lcmp
ifle 21
10: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.channel:()Lio/netty/channel/Channel;
invokeinterface io.netty.channel.Channel.remoteAddress:()Ljava/net/SocketAddress;
checkcast java.net.InetSocketAddress
invokevirtual java.net.InetSocketAddress.getAddress:()Ljava/net/InetAddress;
astore 8
start local 8 11: aload 0
getfield org.apache.cassandra.transport.ConnectionLimitHandler.connectionsPerClient:Ljava/util/concurrent/ConcurrentMap;
aload 8
invokeinterface java.util.concurrent.ConcurrentMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.concurrent.atomic.AtomicLong
astore 9
start local 9 12: aload 9
ifnonnull 17
13: new java.util.concurrent.atomic.AtomicLong
dup
lconst_0
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:(J)V
astore 9
14: aload 0
getfield org.apache.cassandra.transport.ConnectionLimitHandler.connectionsPerClient:Ljava/util/concurrent/ConcurrentMap;
aload 8
aload 9
invokeinterface java.util.concurrent.ConcurrentMap.putIfAbsent:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.concurrent.atomic.AtomicLong
astore 10
start local 10 15: aload 10
ifnull 17
16: aload 10
astore 9
end local 10 17: StackMap locals: long java.net.InetAddress java.util.concurrent.atomic.AtomicLong
StackMap stack:
aload 9
invokevirtual java.util.concurrent.atomic.AtomicLong.incrementAndGet:()J
lload 6
lcmp
ifle 21
18: getstatic org.apache.cassandra.transport.ConnectionLimitHandler.logger:Lorg/slf4j/Logger;
ldc "Exceeded maximum native connection limit per ip of {} by using {} connections"
lload 6
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aload 9
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
19: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.close:()Lio/netty/channel/ChannelFuture;
pop
20: return
end local 9 end local 8 21: StackMap locals:
StackMap stack:
aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.fireChannelActive:()Lio/netty/channel/ChannelHandlerContext;
pop
end local 6 22: StackMap locals:
StackMap stack:
return
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Lorg/apache/cassandra/transport/ConnectionLimitHandler;
0 23 1 ctx Lio/netty/channel/ChannelHandlerContext;
1 23 2 count J
2 23 4 limit J
9 22 6 perIpLimit J
11 21 8 address Ljava/net/InetAddress;
12 21 9 perIpCount Ljava/util/concurrent/atomic/AtomicLong;
15 17 10 old Ljava/util/concurrent/atomic/AtomicLong;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
ctx
public void channelInactive(io.netty.channel.ChannelHandlerContext);
descriptor: (Lio/netty/channel/ChannelHandlerContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.transport.ConnectionLimitHandler.counter:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.decrementAndGet:()J
pop2
1: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.channel:()Lio/netty/channel/Channel;
invokeinterface io.netty.channel.Channel.remoteAddress:()Ljava/net/SocketAddress;
checkcast java.net.InetSocketAddress
invokevirtual java.net.InetSocketAddress.getAddress:()Ljava/net/InetAddress;
astore 2
start local 2 2: aload 0
getfield org.apache.cassandra.transport.ConnectionLimitHandler.connectionsPerClient:Ljava/util/concurrent/ConcurrentMap;
aload 2
invokeinterface java.util.concurrent.ConcurrentMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.concurrent.atomic.AtomicLong
astore 3
start local 3 3: aload 3
ifnull 6
4: aload 3
invokevirtual java.util.concurrent.atomic.AtomicLong.decrementAndGet:()J
lconst_0
lcmp
ifgt 6
5: aload 0
getfield org.apache.cassandra.transport.ConnectionLimitHandler.connectionsPerClient:Ljava/util/concurrent/ConcurrentMap;
aload 2
invokeinterface java.util.concurrent.ConcurrentMap.remove:(Ljava/lang/Object;)Ljava/lang/Object;
pop
6: StackMap locals: java.net.InetAddress java.util.concurrent.atomic.AtomicLong
StackMap stack:
aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.fireChannelInactive:()Lio/netty/channel/ChannelHandlerContext;
pop
7: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/cassandra/transport/ConnectionLimitHandler;
0 8 1 ctx Lio/netty/channel/ChannelHandlerContext;
2 8 2 address Ljava/net/InetAddress;
3 8 3 count Ljava/util/concurrent/atomic/AtomicLong;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
ctx
}
SourceFile: "ConnectionLimitHandler.java"
InnerClasses:
public abstract Sharable = io.netty.channel.ChannelHandler$Sharable of io.netty.channel.ChannelHandler
RuntimeVisibleAnnotations:
io.netty.channel.ChannelHandler$Sharable()