public class org.glassfish.grizzly.impl.SafeFutureImpl<R> implements org.glassfish.grizzly.impl.FutureImpl<R>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.glassfish.grizzly.impl.SafeFutureImpl
super_class: java.lang.Object
{
private final java.lang.Object chSync;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.util.Set<org.glassfish.grizzly.CompletionHandler<R>> completionHandlers;
descriptor: Ljava/util/Set;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Set<Lorg/glassfish/grizzly/CompletionHandler<TR;>;>;
private final org.glassfish.grizzly.impl.SafeFutureImpl<R>.Sync sync;
descriptor: Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>.Sync;
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/glassfish/grizzly/impl/SafeFutureImpl;
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.glassfish.grizzly.impl.SafeFutureImpl.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
public void addCompletionHandler(org.glassfish.grizzly.CompletionHandler<R>);
descriptor: (Lorg/glassfish/grizzly/CompletionHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.isDone:()Z
ifeq 3
1: aload 0
aload 1
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.notifyCompletionHandler:(Lorg/glassfish/grizzly/CompletionHandler;)V
2: goto 15
3: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.chSync:Ljava/lang/Object;
dup
astore 2
monitorenter
4: aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.isDone:()Z
ifne 10
5: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.completionHandlers:Ljava/util/Set;
ifnonnull 7
6: aload 0
new java.util.HashSet
dup
iconst_2
invokespecial java.util.HashSet.<init>:(I)V
putfield org.glassfish.grizzly.impl.SafeFutureImpl.completionHandlers:Ljava/util/Set;
7: StackMap locals: java.lang.Object
StackMap stack:
aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.completionHandlers:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
8: aload 2
monitorexit
9: return
10: StackMap locals:
StackMap stack:
aload 2
monitorexit
11: goto 14
StackMap locals:
StackMap stack: java.lang.Throwable
12: aload 2
monitorexit
13: athrow
14: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.notifyCompletionHandler:(Lorg/glassfish/grizzly/CompletionHandler;)V
15: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
0 16 1 completionHandler Lorg/glassfish/grizzly/CompletionHandler<TR;>;
Exception table:
from to target type
4 9 12 any
10 11 12 any
12 13 12 any
Signature: (Lorg/glassfish/grizzly/CompletionHandler<TR;>;)V
MethodParameters:
Name Flags
completionHandler final
public static <R> org.glassfish.grizzly.impl.SafeFutureImpl<R> create();
descriptor: ()Lorg/glassfish/grizzly/impl/SafeFutureImpl;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.glassfish.grizzly.impl.SafeFutureImpl
dup
invokespecial org.glassfish.grizzly.impl.SafeFutureImpl.<init>:()V
areturn
LocalVariableTable:
Start End Slot Name Signature
Signature: <R:Ljava/lang/Object;>()Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield org.glassfish.grizzly.impl.SafeFutureImpl.chSync:Ljava/lang/Object;
2: aload 0
new org.glassfish.grizzly.impl.SafeFutureImpl$Sync
dup
aload 0
invokespecial org.glassfish.grizzly.impl.SafeFutureImpl$Sync.<init>:(Lorg/glassfish/grizzly/impl/SafeFutureImpl;)V
putfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
public void result();
descriptor: (Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
aload 1
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerSet:(Ljava/lang/Object;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
0 2 1 result TR;
Signature: (TR;)V
MethodParameters:
Name Flags
result
public void failure(java.lang.Throwable);
descriptor: (Ljava/lang/Throwable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
aload 1
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerSetException:(Ljava/lang/Throwable;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
0 2 1 failure Ljava/lang/Throwable;
MethodParameters:
Name Flags
failure
public void markForRecycle(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=2, args_size=2
start local 0 start local 1 0: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
0 1 1 recycleResult Z
MethodParameters:
Name Flags
recycleResult
public void recycle(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=2, args_size=2
start local 0 start local 1 0: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
0 1 1 recycleResult Z
MethodParameters:
Name Flags
recycleResult
public void recycle();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
public R getResult();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.isDone:()Z
ifeq 4
1: aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.get:()Ljava/lang/Object;
2: areturn
3: StackMap locals:
StackMap stack: java.lang.Throwable
pop
4: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
Exception table:
from to target type
1 2 3 Class java.lang.Throwable
Signature: ()TR;
protected void onComplete();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
private void notifyCompletionHandlers();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=7, args_size=1
start local 0 0: getstatic org.glassfish.grizzly.impl.SafeFutureImpl.$assertionsDisabled:Z
ifne 1
aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.isDone:()Z
ifne 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.chSync:Ljava/lang/Object;
dup
astore 2
monitorenter
2: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.completionHandlers:Ljava/util/Set;
ifnonnull 5
3: aload 2
monitorexit
4: return
5: StackMap locals: org.glassfish.grizzly.impl.SafeFutureImpl top java.lang.Object
StackMap stack:
aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.completionHandlers:Ljava/util/Set;
astore 1
start local 1 6: aload 0
aconst_null
putfield org.glassfish.grizzly.impl.SafeFutureImpl.completionHandlers:Ljava/util/Set;
7: aload 2
monitorexit
8: goto 11
end local 1 StackMap locals:
StackMap stack: java.lang.Throwable
9: aload 2
monitorexit
10: athrow
start local 1 11: StackMap locals: org.glassfish.grizzly.impl.SafeFutureImpl java.util.Set
StackMap stack:
aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.isCancelled:()Z
istore 2
start local 2 12: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
getfield org.glassfish.grizzly.impl.SafeFutureImpl$Sync.result:Ljava/lang/Object;
astore 3
start local 3 13: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
getfield org.glassfish.grizzly.impl.SafeFutureImpl$Sync.exception:Ljava/lang/Throwable;
astore 4
start local 4 14: aload 1
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 5
start local 5 15: goto 27
16: StackMap locals: org.glassfish.grizzly.impl.SafeFutureImpl java.util.Set int java.lang.Object java.lang.Throwable java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.glassfish.grizzly.CompletionHandler
astore 6
start local 6 17: aload 5
invokeinterface java.util.Iterator.remove:()V
18: iload 2
ifeq 21
19: aload 6
invokeinterface org.glassfish.grizzly.CompletionHandler.cancelled:()V
20: goto 27
StackMap locals: org.glassfish.grizzly.CompletionHandler
StackMap stack:
21: aload 4
ifnull 24
22: aload 6
aload 4
invokeinterface org.glassfish.grizzly.CompletionHandler.failed:(Ljava/lang/Throwable;)V
23: goto 27
24: StackMap locals:
StackMap stack:
aload 6
aload 3
invokeinterface org.glassfish.grizzly.CompletionHandler.completed:(Ljava/lang/Object;)V
25: goto 27
StackMap locals:
StackMap stack: java.lang.Exception
26: pop
end local 6 27: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 16
end local 5 28: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
6 9 1 localSet Ljava/util/Set<Lorg/glassfish/grizzly/CompletionHandler<TR;>;>;
11 29 1 localSet Ljava/util/Set<Lorg/glassfish/grizzly/CompletionHandler<TR;>;>;
12 29 2 isCancelled Z
13 29 3 result TR;
14 29 4 error Ljava/lang/Throwable;
15 28 5 it Ljava/util/Iterator<Lorg/glassfish/grizzly/CompletionHandler<TR;>;>;
17 27 6 completionHandler Lorg/glassfish/grizzly/CompletionHandler<TR;>;
Exception table:
from to target type
2 4 9 any
5 8 9 any
9 10 9 any
18 25 26 Class java.lang.Exception
private void notifyCompletionHandler(org.glassfish.grizzly.CompletionHandler<R>);
descriptor: (Lorg/glassfish/grizzly/CompletionHandler;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.isCancelled:()Z
ifeq 3
1: aload 1
invokeinterface org.glassfish.grizzly.CompletionHandler.cancelled:()V
2: goto 13
3: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.get:()Ljava/lang/Object;
astore 2
start local 2 4: aload 1
aload 2
invokeinterface org.glassfish.grizzly.CompletionHandler.completed:(Ljava/lang/Object;)V
5: goto 13
StackMap locals: org.glassfish.grizzly.impl.SafeFutureImpl org.glassfish.grizzly.CompletionHandler java.lang.Object
StackMap stack: java.lang.Exception
6: pop
end local 2 7: goto 13
StackMap locals: org.glassfish.grizzly.impl.SafeFutureImpl org.glassfish.grizzly.CompletionHandler
StackMap stack: java.util.concurrent.ExecutionException
8: astore 2
start local 2 9: aload 1
aload 2
invokevirtual java.util.concurrent.ExecutionException.getCause:()Ljava/lang/Throwable;
invokeinterface org.glassfish.grizzly.CompletionHandler.failed:(Ljava/lang/Throwable;)V
end local 2 10: goto 13
11: StackMap locals:
StackMap stack: java.lang.Exception
astore 2
start local 2 12: aload 1
aload 2
invokeinterface org.glassfish.grizzly.CompletionHandler.failed:(Ljava/lang/Throwable;)V
end local 2 13: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
0 14 1 completionHandler Lorg/glassfish/grizzly/CompletionHandler<TR;>;
4 7 2 result TR;
9 10 2 e Ljava/util/concurrent/ExecutionException;
12 13 2 e Ljava/lang/Exception;
Exception table:
from to target type
4 5 6 Class java.lang.Exception
3 7 8 Class java.util.concurrent.ExecutionException
3 7 11 Class java.lang.Exception
Signature: (Lorg/glassfish/grizzly/CompletionHandler<TR;>;)V
MethodParameters:
Name Flags
completionHandler final
public boolean isCancelled();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerIsCancelled:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
public boolean isDone();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl$Sync.ranOrCancelled:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
public boolean cancel(boolean);
descriptor: (Z)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
iload 1
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerCancel:(Z)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
0 1 1 mayInterruptIfRunning Z
MethodParameters:
Name Flags
mayInterruptIfRunning
public R get();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerGet:()Ljava/lang/Object;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
Exceptions:
throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Signature: ()TR;
public R get(long, java.util.concurrent.TimeUnit);
descriptor: (JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 3 0: aload 0
getfield org.glassfish.grizzly.impl.SafeFutureImpl.sync:Lorg/glassfish/grizzly/impl/SafeFutureImpl$Sync;
aload 3
lload 1
invokevirtual java.util.concurrent.TimeUnit.toNanos:(J)J
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerGet:(J)Ljava/lang/Object;
areturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
0 1 1 timeout J
0 1 3 unit Ljava/util/concurrent/TimeUnit;
Exceptions:
throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
Signature: (JLjava/util/concurrent/TimeUnit;)TR;
MethodParameters:
Name Flags
timeout
unit
protected void done();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.notifyCompletionHandlers:()V
1: aload 0
invokevirtual org.glassfish.grizzly.impl.SafeFutureImpl.onComplete:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/impl/SafeFutureImpl<TR;>;
}
Signature: <R:Ljava/lang/Object;>Ljava/lang/Object;Lorg/glassfish/grizzly/impl/FutureImpl<TR;>;
SourceFile: "SafeFutureImpl.java"
NestMembers:
org.glassfish.grizzly.impl.SafeFutureImpl$Sync
InnerClasses:
private final Sync = org.glassfish.grizzly.impl.SafeFutureImpl$Sync of org.glassfish.grizzly.impl.SafeFutureImpl