public final class org.glassfish.grizzly.utils.StateHolder<E>
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.glassfish.grizzly.utils.StateHolder
super_class: java.lang.Object
{
private static final java.util.logging.Logger _logger;
descriptor: Ljava/util/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private volatile E state;
descriptor: Ljava/lang/Object;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
Signature: TE;
private final java.util.concurrent.locks.ReentrantReadWriteLock readWriteLock;
descriptor: Ljava/util/concurrent/locks/ReentrantReadWriteLock;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Collection<org.glassfish.grizzly.utils.StateHolder$ConditionElement<E>> conditionListeners;
descriptor: Ljava/util/Collection;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Collection<Lorg/glassfish/grizzly/utils/StateHolder$ConditionElement<TE;>;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/glassfish/grizzly/utils/StateHolder;
invokestatic org.glassfish.grizzly.Grizzly.logger:(Ljava/lang/Class;)Ljava/util/logging/Logger;
putstatic org.glassfish.grizzly.utils.StateHolder._logger:Ljava/util/logging/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aconst_null
invokespecial org.glassfish.grizzly.utils.StateHolder.<init>:(Ljava/lang/Object;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
public void <init>();
descriptor: (Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.glassfish.grizzly.utils.StateHolder.state:Ljava/lang/Object;
2: aload 0
new java.util.concurrent.locks.ReentrantReadWriteLock
dup
invokespecial java.util.concurrent.locks.ReentrantReadWriteLock.<init>:()V
putfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
3: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.glassfish.grizzly.utils.StateHolder.conditionListeners:Ljava/util/Collection;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
0 5 1 initialState TE;
Signature: (TE;)V
MethodParameters:
Name Flags
initialState
public E getState();
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.utils.StateHolder.state:Ljava/lang/Object;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
Signature: ()TE;
public void setState();
descriptor: (Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock.writeLock:()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock:()V
1: aload 0
aload 1
putfield org.glassfish.grizzly.utils.StateHolder.state:Ljava/lang/Object;
2: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock.readLock:()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock:()V
3: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock.writeLock:()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.unlock:()V
4: aload 0
invokevirtual org.glassfish.grizzly.utils.StateHolder.notifyConditionListeners:()V
5: goto 9
StackMap locals:
StackMap stack: java.lang.Throwable
6: astore 2
7: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock.readLock:()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock:()V
8: aload 2
athrow
9: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock.readLock:()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock:()V
10: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
0 11 1 state TE;
Exception table:
from to target type
1 6 6 any
Signature: (TE;)V
MethodParameters:
Name Flags
state
public java.util.concurrent.locks.ReentrantReadWriteLock getStateLocker();
descriptor: ()Ljava/util/concurrent/locks/ReentrantReadWriteLock;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
public java.util.concurrent.Future<E> notifyWhenStateIsEqual(E, org.glassfish.grizzly.CompletionHandler<E>);
descriptor: (Ljava/lang/Object;Lorg/glassfish/grizzly/CompletionHandler;)Ljava/util/concurrent/Future;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
new org.glassfish.grizzly.utils.StateHolder$1
dup
aload 0
aload 1
invokespecial org.glassfish.grizzly.utils.StateHolder$1.<init>:(Lorg/glassfish/grizzly/utils/StateHolder;Ljava/lang/Object;)V
1: aload 2
2: invokevirtual org.glassfish.grizzly.utils.StateHolder.notifyWhenConditionMatchState:(Lorg/glassfish/grizzly/utils/conditions/Condition;Lorg/glassfish/grizzly/CompletionHandler;)Ljava/util/concurrent/Future;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
0 3 1 state TE;
0 3 2 completionHandler Lorg/glassfish/grizzly/CompletionHandler<TE;>;
Signature: (TE;Lorg/glassfish/grizzly/CompletionHandler<TE;>;)Ljava/util/concurrent/Future<TE;>;
MethodParameters:
Name Flags
state final
completionHandler final
public java.util.concurrent.Future<E> notifyWhenStateIsNotEqual(E, org.glassfish.grizzly.CompletionHandler<E>);
descriptor: (Ljava/lang/Object;Lorg/glassfish/grizzly/CompletionHandler;)Ljava/util/concurrent/Future;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
new org.glassfish.grizzly.utils.StateHolder$2
dup
aload 0
aload 1
invokespecial org.glassfish.grizzly.utils.StateHolder$2.<init>:(Lorg/glassfish/grizzly/utils/StateHolder;Ljava/lang/Object;)V
1: aload 2
2: invokevirtual org.glassfish.grizzly.utils.StateHolder.notifyWhenConditionMatchState:(Lorg/glassfish/grizzly/utils/conditions/Condition;Lorg/glassfish/grizzly/CompletionHandler;)Ljava/util/concurrent/Future;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
0 3 1 state TE;
0 3 2 completionHandler Lorg/glassfish/grizzly/CompletionHandler<TE;>;
Signature: (TE;Lorg/glassfish/grizzly/CompletionHandler<TE;>;)Ljava/util/concurrent/Future<TE;>;
MethodParameters:
Name Flags
state final
completionHandler final
public java.util.concurrent.Future<E> notifyWhenConditionMatchState(org.glassfish.grizzly.utils.conditions.Condition, org.glassfish.grizzly.CompletionHandler<E>);
descriptor: (Lorg/glassfish/grizzly/utils/conditions/Condition;Lorg/glassfish/grizzly/CompletionHandler;)Ljava/util/concurrent/Future;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock.readLock:()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock:()V
1: aload 1
invokeinterface org.glassfish.grizzly.utils.conditions.Condition.check:()Z
ifeq 6
2: aload 2
ifnull 4
3: aload 2
aload 0
getfield org.glassfish.grizzly.utils.StateHolder.state:Ljava/lang/Object;
invokeinterface org.glassfish.grizzly.CompletionHandler.completed:(Ljava/lang/Object;)V
4: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.utils.StateHolder.state:Ljava/lang/Object;
invokestatic org.glassfish.grizzly.impl.ReadyFutureImpl.create:(Ljava/lang/Object;)Lorg/glassfish/grizzly/impl/ReadyFutureImpl;
astore 3
start local 3 5: goto 14
end local 3 6: StackMap locals:
StackMap stack:
invokestatic org.glassfish.grizzly.impl.SafeFutureImpl.create:()Lorg/glassfish/grizzly/impl/SafeFutureImpl;
astore 4
start local 4 7: new org.glassfish.grizzly.utils.StateHolder$ConditionElement
dup
aload 1
aload 4
aload 2
invokespecial org.glassfish.grizzly.utils.StateHolder$ConditionElement.<init>:(Lorg/glassfish/grizzly/utils/conditions/Condition;Lorg/glassfish/grizzly/impl/FutureImpl;Lorg/glassfish/grizzly/CompletionHandler;)V
astore 5
start local 5 8: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.conditionListeners:Ljava/util/Collection;
aload 5
invokeinterface java.util.Collection.add:(Ljava/lang/Object;)Z
pop
9: aload 4
astore 3
end local 5 end local 4 start local 3 10: goto 14
end local 3 StackMap locals:
StackMap stack: java.lang.Throwable
11: astore 6
12: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock.readLock:()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock:()V
13: aload 6
athrow
start local 3 14: StackMap locals: java.util.concurrent.Future
StackMap stack:
aload 0
getfield org.glassfish.grizzly.utils.StateHolder.readWriteLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock.readLock:()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
invokevirtual java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock:()V
15: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
0 16 1 condition Lorg/glassfish/grizzly/utils/conditions/Condition;
0 16 2 completionHandler Lorg/glassfish/grizzly/CompletionHandler<TE;>;
5 6 3 resultFuture Ljava/util/concurrent/Future<TE;>;
10 11 3 resultFuture Ljava/util/concurrent/Future<TE;>;
14 16 3 resultFuture Ljava/util/concurrent/Future<TE;>;
7 10 4 future Lorg/glassfish/grizzly/impl/FutureImpl<TE;>;
8 10 5 elem Lorg/glassfish/grizzly/utils/StateHolder$ConditionElement<TE;>;
Exception table:
from to target type
1 11 11 any
Signature: (Lorg/glassfish/grizzly/utils/conditions/Condition;Lorg/glassfish/grizzly/CompletionHandler<TE;>;)Ljava/util/concurrent/Future<TE;>;
MethodParameters:
Name Flags
condition
completionHandler
protected void notifyConditionListeners();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.utils.StateHolder.conditionListeners:Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 1
start local 1 1: goto 11
2: StackMap locals: java.util.Iterator
StackMap stack:
aload 1
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.glassfish.grizzly.utils.StateHolder$ConditionElement
astore 2
start local 2 3: aload 2
getfield org.glassfish.grizzly.utils.StateHolder$ConditionElement.condition:Lorg/glassfish/grizzly/utils/conditions/Condition;
invokeinterface org.glassfish.grizzly.utils.conditions.Condition.check:()Z
ifeq 11
4: aload 1
invokeinterface java.util.Iterator.remove:()V
5: aload 2
getfield org.glassfish.grizzly.utils.StateHolder$ConditionElement.completionHandler:Lorg/glassfish/grizzly/CompletionHandler;
ifnull 7
6: aload 2
getfield org.glassfish.grizzly.utils.StateHolder$ConditionElement.completionHandler:Lorg/glassfish/grizzly/CompletionHandler;
aload 0
getfield org.glassfish.grizzly.utils.StateHolder.state:Ljava/lang/Object;
invokeinterface org.glassfish.grizzly.CompletionHandler.completed:(Ljava/lang/Object;)V
7: StackMap locals: org.glassfish.grizzly.utils.StateHolder$ConditionElement
StackMap stack:
aload 2
getfield org.glassfish.grizzly.utils.StateHolder$ConditionElement.future:Lorg/glassfish/grizzly/impl/FutureImpl;
aload 0
getfield org.glassfish.grizzly.utils.StateHolder.state:Ljava/lang/Object;
invokeinterface org.glassfish.grizzly.impl.FutureImpl.result:(Ljava/lang/Object;)V
8: goto 11
StackMap locals:
StackMap stack: java.lang.Exception
9: astore 3
start local 3 10: getstatic org.glassfish.grizzly.utils.StateHolder._logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.WARNING:Ljava/util/logging/Level;
invokestatic org.glassfish.grizzly.localization.LogMessages.WARNING_GRIZZLY_STATE_HOLDER_CALLING_CONDITIONLISTENER_EXCEPTION:()Ljava/lang/String;
aload 3
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 3 end local 2 11: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
12: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/glassfish/grizzly/utils/StateHolder<TE;>;
1 13 1 it Ljava/util/Iterator<Lorg/glassfish/grizzly/utils/StateHolder$ConditionElement<TE;>;>;
3 11 2 element Lorg/glassfish/grizzly/utils/StateHolder$ConditionElement<TE;>;
10 11 3 e Ljava/lang/Exception;
Exception table:
from to target type
3 8 9 Class java.lang.Exception
}
Signature: <E:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "StateHolder.java"
NestMembers:
org.glassfish.grizzly.utils.StateHolder$1 org.glassfish.grizzly.utils.StateHolder$2 org.glassfish.grizzly.utils.StateHolder$ConditionElement
InnerClasses:
public ReadLock = java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock of java.util.concurrent.locks.ReentrantReadWriteLock
public WriteLock = java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock of java.util.concurrent.locks.ReentrantReadWriteLock
org.glassfish.grizzly.utils.StateHolder$1
org.glassfish.grizzly.utils.StateHolder$2
protected final ConditionElement = org.glassfish.grizzly.utils.StateHolder$ConditionElement of org.glassfish.grizzly.utils.StateHolder