class jdk.incubator.http.DefaultPublisher$Subscription implements java.util.concurrent.Flow$Subscription
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: jdk.incubator.http.DefaultPublisher$Subscription
super_class: java.lang.Object
{
private final java.util.concurrent.Flow$Subscriber<? super T> subscriber;
descriptor: Ljava/util/concurrent/Flow$Subscriber;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/Flow$Subscriber<-TT;>;
private final java.util.concurrent.atomic.AtomicBoolean done;
descriptor: Ljava/util/concurrent/atomic/AtomicBoolean;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicLong demand;
descriptor: Ljava/util/concurrent/atomic/AtomicLong;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.locks.Lock consumerLock;
descriptor: Ljava/util/concurrent/locks/Lock;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.locks.Condition consumerAlarm;
descriptor: Ljava/util/concurrent/locks/Condition;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
final jdk.incubator.http.DefaultPublisher this$0;
descriptor: Ljdk/incubator/http/DefaultPublisher;
flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
void <init>(java.util.concurrent.Flow$Subscriber<? super T>);
descriptor: (Ljdk/incubator/http/DefaultPublisher;Ljava/util/concurrent/Flow$Subscriber;)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 2 0: aload 0
aload 1
putfield jdk.incubator.http.DefaultPublisher$Subscription.this$0:Ljdk/incubator/http/DefaultPublisher;
aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.atomic.AtomicBoolean
dup
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:()V
putfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
2: aload 0
new java.util.concurrent.atomic.AtomicLong
dup
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:()V
putfield jdk.incubator.http.DefaultPublisher$Subscription.demand:Ljava/util/concurrent/atomic/AtomicLong;
3: aload 0
new java.util.concurrent.locks.ReentrantLock
dup
invokespecial java.util.concurrent.locks.ReentrantLock.<init>:()V
putfield jdk.incubator.http.DefaultPublisher$Subscription.consumerLock:Ljava/util/concurrent/locks/Lock;
4: aload 0
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerLock:Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.newCondition:()Ljava/util/concurrent/locks/Condition;
putfield jdk.incubator.http.DefaultPublisher$Subscription.consumerAlarm:Ljava/util/concurrent/locks/Condition;
5: aload 0
aload 2
putfield jdk.incubator.http.DefaultPublisher$Subscription.subscriber:Ljava/util/concurrent/Flow$Subscriber;
6: aload 1
getfield jdk.incubator.http.DefaultPublisher.executor:Ljava/util/concurrent/Executor;
aload 0
aload 2
invokedynamic run(Ljdk/incubator/http/DefaultPublisher$Subscription;Ljava/util/concurrent/Flow$Subscriber;)Ljava/lang/Runnable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
jdk/incubator/http/DefaultPublisher$Subscription.lambda$0(Ljava/util/concurrent/Flow$Subscriber;)V (7)
()V
invokeinterface java.util.concurrent.Executor.execute:(Ljava/lang/Runnable;)V
7: return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/incubator/http/DefaultPublisher$Subscription;
0 8 2 subscriber Ljava/util/concurrent/Flow$Subscriber<-TT;>;
Signature: (Ljava/util/concurrent/Flow$Subscriber<-TT;>;)V
MethodParameters:
Name Flags
this$0 final
subscriber
public void request(long);
descriptor: (J)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifne 4
lload 1
lconst_0
lcmp
ifle 4
1: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.demand:Ljava/util/concurrent/atomic/AtomicLong;
lload 1
invokedynamic applyAsLong(J)Ljava/util/function/LongUnaryOperator;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(J)J
jdk/incubator/http/DefaultPublisher$Subscription.lambda$1(JJ)J (6)
(J)J
invokevirtual java.util.concurrent.atomic.AtomicLong.updateAndGet:(Ljava/util/function/LongUnaryOperator;)J
pop2
2: aload 0
invokevirtual jdk.incubator.http.DefaultPublisher$Subscription.wakeConsumer:()V
3: goto 6
StackMap locals:
StackMap stack:
4: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifeq 6
5: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.subscriber:Ljava/util/concurrent/Flow$Subscriber;
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "request("
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 1
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc ")"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
invokeinterface java.util.concurrent.Flow$Subscriber.onError:(Ljava/lang/Throwable;)V
6: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/incubator/http/DefaultPublisher$Subscription;
0 7 1 n J
MethodParameters:
Name Flags
n
public void cancel();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
1: aload 0
invokevirtual jdk.incubator.http.DefaultPublisher$Subscription.wakeConsumer:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/incubator/http/DefaultPublisher$Subscription;
private void wakeConsumer();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerLock:Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.lock:()V
1: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerAlarm:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
2: goto 6
StackMap locals:
StackMap stack: java.lang.Throwable
3: astore 1
4: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerLock:Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.unlock:()V
5: aload 1
athrow
6: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerLock:Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.unlock:()V
7: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/incubator/http/DefaultPublisher$Subscription;
Exception table:
from to target type
1 3 3 any
private void lambda$0(java.util.concurrent.Flow$Subscriber);
descriptor: (Ljava/util/concurrent/Flow$Subscriber;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=4, locals=7, args_size=2
start local 0 0: goto 25
1: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerLock:Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.lock:()V
2: goto 4
3: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerAlarm:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.await:()V
4: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifne 9
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.demand:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.get:()J
lconst_0
lcmp
ifeq 3
5: goto 9
StackMap locals:
StackMap stack: java.lang.Throwable
6: astore 2
7: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerLock:Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.unlock:()V
8: aload 2
athrow
9: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.consumerLock:Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.unlock:()V
10: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.demand:Ljava/util/concurrent/atomic/AtomicLong;
lconst_0
invokevirtual java.util.concurrent.atomic.AtomicLong.getAndSet:(J)J
lstore 2
start local 2 11: lconst_0
lstore 4
start local 4 12: goto 24
13: StackMap locals: long long
StackMap stack:
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.this$0:Ljdk/incubator/http/DefaultPublisher;
getfield jdk.incubator.http.DefaultPublisher.supplier:Ljava/util/function/Supplier;
invokeinterface java.util.function.Supplier.get:()Ljava/lang/Object;
checkcast java.util.Optional
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.Optional
astore 6
start local 6 14: aload 6
invokevirtual java.util.Optional.isPresent:()Z
ifeq 17
15: aload 1
aload 6
invokevirtual java.util.Optional.get:()Ljava/lang/Object;
invokeinterface java.util.concurrent.Flow$Subscriber.onNext:(Ljava/lang/Object;)V
16: goto 23
17: StackMap locals: java.util.Optional
StackMap stack:
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifeq 23
18: aload 1
invokeinterface java.util.concurrent.Flow$Subscriber.onComplete:()V
end local 6 19: goto 23
StackMap locals: jdk.incubator.http.DefaultPublisher$Subscription java.util.concurrent.Flow$Subscriber long long
StackMap stack: java.lang.RuntimeException
20: astore 6
start local 6 21: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifeq 23
22: aload 1
aload 6
invokeinterface java.util.concurrent.Flow$Subscriber.onError:(Ljava/lang/Throwable;)V
end local 6 23: StackMap locals:
StackMap stack:
lload 4
lconst_1
ladd
lstore 4
StackMap locals:
StackMap stack:
24: lload 4
lload 2
lcmp
ifge 25
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifeq 13
end local 4 end local 2 25: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifeq 1
26: goto 31
StackMap locals:
StackMap stack: java.lang.InterruptedException
27: astore 2
start local 2 28: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.interrupt:()V
29: aload 0
getfield jdk.incubator.http.DefaultPublisher$Subscription.done:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifeq 31
30: aload 1
aload 2
invokeinterface java.util.concurrent.Flow$Subscriber.onError:(Ljava/lang/Throwable;)V
end local 2 31: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Ljdk/incubator/http/DefaultPublisher$Subscription;
11 25 2 nbItemsDemanded J
12 25 4 i J
14 19 6 item Ljava/util/Optional<TT;>;
21 23 6 e Ljava/lang/RuntimeException;
28 31 2 e Ljava/lang/InterruptedException;
Exception table:
from to target type
2 6 6 any
13 19 20 Class java.lang.RuntimeException
0 26 27 Class java.lang.InterruptedException
private static long lambda$1(long, long);
descriptor: (JJ)J
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=4, locals=4, args_size=2
start local 2 0: lload 2
lload 0
ladd
lconst_0
lcmp
ifle 1
lload 2
lload 0
ladd
goto 2
StackMap locals:
StackMap stack:
1: ldc 9223372036854775807
StackMap locals:
StackMap stack: long
2: lreturn
end local 2 LocalVariableTable:
Start End Slot Name Signature
0 3 2 d J
}
SourceFile: "DefaultPublisher.java"
NestHost: jdk.incubator.http.DefaultPublisher
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract Subscriber = java.util.concurrent.Flow$Subscriber of java.util.concurrent.Flow
public abstract Subscription = java.util.concurrent.Flow$Subscription of java.util.concurrent.Flow
private Subscription = jdk.incubator.http.DefaultPublisher$Subscription of jdk.incubator.http.DefaultPublisher