public final class com.lmax.disruptor.WorkProcessor<T> implements com.lmax.disruptor.EventProcessor
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.lmax.disruptor.WorkProcessor
super_class: java.lang.Object
{
private final java.util.concurrent.atomic.AtomicBoolean running;
descriptor: Ljava/util/concurrent/atomic/AtomicBoolean;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.lmax.disruptor.Sequence sequence;
descriptor: Lcom/lmax/disruptor/Sequence;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.lmax.disruptor.RingBuffer<T> ringBuffer;
descriptor: Lcom/lmax/disruptor/RingBuffer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/lmax/disruptor/RingBuffer<TT;>;
private final com.lmax.disruptor.SequenceBarrier sequenceBarrier;
descriptor: Lcom/lmax/disruptor/SequenceBarrier;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.lmax.disruptor.WorkHandler<? super T> workHandler;
descriptor: Lcom/lmax/disruptor/WorkHandler;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/lmax/disruptor/WorkHandler<-TT;>;
private final com.lmax.disruptor.ExceptionHandler<? super T> exceptionHandler;
descriptor: Lcom/lmax/disruptor/ExceptionHandler;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/lmax/disruptor/ExceptionHandler<-TT;>;
private final com.lmax.disruptor.Sequence workSequence;
descriptor: Lcom/lmax/disruptor/Sequence;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.lmax.disruptor.EventReleaser eventReleaser;
descriptor: Lcom/lmax/disruptor/EventReleaser;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.lmax.disruptor.TimeoutHandler timeoutHandler;
descriptor: Lcom/lmax/disruptor/TimeoutHandler;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(com.lmax.disruptor.RingBuffer<T>, com.lmax.disruptor.SequenceBarrier, com.lmax.disruptor.WorkHandler<? super T>, com.lmax.disruptor.ExceptionHandler<? super T>, com.lmax.disruptor.Sequence);
descriptor: (Lcom/lmax/disruptor/RingBuffer;Lcom/lmax/disruptor/SequenceBarrier;Lcom/lmax/disruptor/WorkHandler;Lcom/lmax/disruptor/ExceptionHandler;Lcom/lmax/disruptor/Sequence;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.atomic.AtomicBoolean
dup
iconst_0
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:(Z)V
putfield com.lmax.disruptor.WorkProcessor.running:Ljava/util/concurrent/atomic/AtomicBoolean;
2: aload 0
new com.lmax.disruptor.Sequence
dup
ldc -1
invokespecial com.lmax.disruptor.Sequence.<init>:(J)V
putfield com.lmax.disruptor.WorkProcessor.sequence:Lcom/lmax/disruptor/Sequence;
3: aload 0
new com.lmax.disruptor.WorkProcessor$1
dup
aload 0
invokespecial com.lmax.disruptor.WorkProcessor$1.<init>:(Lcom/lmax/disruptor/WorkProcessor;)V
putfield com.lmax.disruptor.WorkProcessor.eventReleaser:Lcom/lmax/disruptor/EventReleaser;
4: aload 0
aload 1
putfield com.lmax.disruptor.WorkProcessor.ringBuffer:Lcom/lmax/disruptor/RingBuffer;
5: aload 0
aload 2
putfield com.lmax.disruptor.WorkProcessor.sequenceBarrier:Lcom/lmax/disruptor/SequenceBarrier;
6: aload 0
aload 3
putfield com.lmax.disruptor.WorkProcessor.workHandler:Lcom/lmax/disruptor/WorkHandler;
7: aload 0
aload 4
putfield com.lmax.disruptor.WorkProcessor.exceptionHandler:Lcom/lmax/disruptor/ExceptionHandler;
8: aload 0
aload 5
putfield com.lmax.disruptor.WorkProcessor.workSequence:Lcom/lmax/disruptor/Sequence;
9: aload 0
getfield com.lmax.disruptor.WorkProcessor.workHandler:Lcom/lmax/disruptor/WorkHandler;
instanceof com.lmax.disruptor.EventReleaseAware
ifeq 11
10: aload 0
getfield com.lmax.disruptor.WorkProcessor.workHandler:Lcom/lmax/disruptor/WorkHandler;
checkcast com.lmax.disruptor.EventReleaseAware
aload 0
getfield com.lmax.disruptor.WorkProcessor.eventReleaser:Lcom/lmax/disruptor/EventReleaser;
invokeinterface com.lmax.disruptor.EventReleaseAware.setEventReleaser:(Lcom/lmax/disruptor/EventReleaser;)V
11: StackMap locals: com.lmax.disruptor.WorkProcessor com.lmax.disruptor.RingBuffer com.lmax.disruptor.SequenceBarrier com.lmax.disruptor.WorkHandler com.lmax.disruptor.ExceptionHandler com.lmax.disruptor.Sequence
StackMap stack:
aload 0
aload 3
instanceof com.lmax.disruptor.TimeoutHandler
ifeq 12
aload 3
checkcast com.lmax.disruptor.TimeoutHandler
goto 13
StackMap locals:
StackMap stack: com.lmax.disruptor.WorkProcessor
12: aconst_null
StackMap locals: com.lmax.disruptor.WorkProcessor com.lmax.disruptor.RingBuffer com.lmax.disruptor.SequenceBarrier com.lmax.disruptor.WorkHandler com.lmax.disruptor.ExceptionHandler com.lmax.disruptor.Sequence
StackMap stack: com.lmax.disruptor.WorkProcessor com.lmax.disruptor.TimeoutHandler
13: putfield com.lmax.disruptor.WorkProcessor.timeoutHandler:Lcom/lmax/disruptor/TimeoutHandler;
14: return
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 15 0 this Lcom/lmax/disruptor/WorkProcessor<TT;>;
0 15 1 ringBuffer Lcom/lmax/disruptor/RingBuffer<TT;>;
0 15 2 sequenceBarrier Lcom/lmax/disruptor/SequenceBarrier;
0 15 3 workHandler Lcom/lmax/disruptor/WorkHandler<-TT;>;
0 15 4 exceptionHandler Lcom/lmax/disruptor/ExceptionHandler<-TT;>;
0 15 5 workSequence Lcom/lmax/disruptor/Sequence;
Signature: (Lcom/lmax/disruptor/RingBuffer<TT;>;Lcom/lmax/disruptor/SequenceBarrier;Lcom/lmax/disruptor/WorkHandler<-TT;>;Lcom/lmax/disruptor/ExceptionHandler<-TT;>;Lcom/lmax/disruptor/Sequence;)V
MethodParameters:
Name Flags
ringBuffer final
sequenceBarrier final
workHandler final
exceptionHandler final
workSequence final
public com.lmax.disruptor.Sequence getSequence();
descriptor: ()Lcom/lmax/disruptor/Sequence;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.lmax.disruptor.WorkProcessor.sequence:Lcom/lmax/disruptor/Sequence;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/lmax/disruptor/WorkProcessor<TT;>;
public void halt();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.lmax.disruptor.WorkProcessor.running:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
1: aload 0
getfield com.lmax.disruptor.WorkProcessor.sequenceBarrier:Lcom/lmax/disruptor/SequenceBarrier;
invokeinterface com.lmax.disruptor.SequenceBarrier.alert:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/lmax/disruptor/WorkProcessor<TT;>;
public boolean isRunning();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.lmax.disruptor.WorkProcessor.running:Ljava/util/concurrent/atomic/AtomicBoolean;
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/lmax/disruptor/WorkProcessor<TT;>;
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=8, args_size=1
start local 0 0: aload 0
getfield com.lmax.disruptor.WorkProcessor.running:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifne 2
1: new java.lang.IllegalStateException
dup
ldc "Thread is already running"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield com.lmax.disruptor.WorkProcessor.sequenceBarrier:Lcom/lmax/disruptor/SequenceBarrier;
invokeinterface com.lmax.disruptor.SequenceBarrier.clearAlert:()V
3: aload 0
invokevirtual com.lmax.disruptor.WorkProcessor.notifyStart:()V
4: iconst_1
istore 1
start local 1 5: ldc -9223372036854775808
lstore 2
start local 2 6: aload 0
getfield com.lmax.disruptor.WorkProcessor.sequence:Lcom/lmax/disruptor/Sequence;
invokevirtual com.lmax.disruptor.Sequence.get:()J
lstore 4
start local 4 7: aconst_null
astore 6
start local 6 8: StackMap locals: com.lmax.disruptor.WorkProcessor int long long java.lang.Object
StackMap stack:
iload 1
ifeq 13
9: iconst_0
istore 1
10: StackMap locals:
StackMap stack:
aload 0
getfield com.lmax.disruptor.WorkProcessor.workSequence:Lcom/lmax/disruptor/Sequence;
invokevirtual com.lmax.disruptor.Sequence.get:()J
lconst_1
ladd
lstore 4
11: aload 0
getfield com.lmax.disruptor.WorkProcessor.sequence:Lcom/lmax/disruptor/Sequence;
lload 4
lconst_1
lsub
invokevirtual com.lmax.disruptor.Sequence.set:(J)V
12: aload 0
getfield com.lmax.disruptor.WorkProcessor.workSequence:Lcom/lmax/disruptor/Sequence;
lload 4
lconst_1
lsub
lload 4
invokevirtual com.lmax.disruptor.Sequence.compareAndSet:(JJ)Z
ifeq 10
13: StackMap locals:
StackMap stack:
lload 2
lload 4
lcmp
iflt 18
14: aload 0
getfield com.lmax.disruptor.WorkProcessor.ringBuffer:Lcom/lmax/disruptor/RingBuffer;
lload 4
invokevirtual com.lmax.disruptor.RingBuffer.get:(J)Ljava/lang/Object;
astore 6
15: aload 0
getfield com.lmax.disruptor.WorkProcessor.workHandler:Lcom/lmax/disruptor/WorkHandler;
aload 6
invokeinterface com.lmax.disruptor.WorkHandler.onEvent:(Ljava/lang/Object;)V
16: iconst_1
istore 1
17: goto 8
18: StackMap locals:
StackMap stack:
aload 0
getfield com.lmax.disruptor.WorkProcessor.sequenceBarrier:Lcom/lmax/disruptor/SequenceBarrier;
lload 4
invokeinterface com.lmax.disruptor.SequenceBarrier.waitFor:(J)J
lstore 2
19: goto 8
20: StackMap locals:
StackMap stack: com.lmax.disruptor.TimeoutException
pop
21: aload 0
aload 0
getfield com.lmax.disruptor.WorkProcessor.sequence:Lcom/lmax/disruptor/Sequence;
invokevirtual com.lmax.disruptor.Sequence.get:()J
invokevirtual com.lmax.disruptor.WorkProcessor.notifyTimeout:(J)V
goto 8
22: StackMap locals:
StackMap stack: com.lmax.disruptor.AlertException
pop
23: aload 0
getfield com.lmax.disruptor.WorkProcessor.running:Ljava/util/concurrent/atomic/AtomicBoolean;
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifne 8
24: goto 29
25: StackMap locals:
StackMap stack: java.lang.Throwable
astore 7
start local 7 26: aload 0
getfield com.lmax.disruptor.WorkProcessor.exceptionHandler:Lcom/lmax/disruptor/ExceptionHandler;
aload 7
lload 4
aload 6
invokeinterface com.lmax.disruptor.ExceptionHandler.handleEventException:(Ljava/lang/Throwable;JLjava/lang/Object;)V
27: iconst_1
istore 1
end local 7 28: goto 8
29: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.lmax.disruptor.WorkProcessor.notifyShutdown:()V
30: aload 0
getfield com.lmax.disruptor.WorkProcessor.running:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
31: return
end local 6 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Lcom/lmax/disruptor/WorkProcessor<TT;>;
5 32 1 processedSequence Z
6 32 2 cachedAvailableSequence J
7 32 4 nextSequence J
8 32 6 event TT;
26 28 7 ex Ljava/lang/Throwable;
Exception table:
from to target type
8 19 20 Class com.lmax.disruptor.TimeoutException
8 19 22 Class com.lmax.disruptor.AlertException
8 19 25 Class java.lang.Throwable
private void notifyTimeout(long);
descriptor: (J)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield com.lmax.disruptor.WorkProcessor.timeoutHandler:Lcom/lmax/disruptor/TimeoutHandler;
ifnull 5
1: aload 0
getfield com.lmax.disruptor.WorkProcessor.timeoutHandler:Lcom/lmax/disruptor/TimeoutHandler;
lload 1
invokeinterface com.lmax.disruptor.TimeoutHandler.onTimeout:(J)V
2: goto 5
3: StackMap locals:
StackMap stack: java.lang.Throwable
astore 3
start local 3 4: aload 0
getfield com.lmax.disruptor.WorkProcessor.exceptionHandler:Lcom/lmax/disruptor/ExceptionHandler;
aload 3
lload 1
aconst_null
invokeinterface com.lmax.disruptor.ExceptionHandler.handleEventException:(Ljava/lang/Throwable;JLjava/lang/Object;)V
end local 3 5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/lmax/disruptor/WorkProcessor<TT;>;
0 6 1 availableSequence J
4 5 3 e Ljava/lang/Throwable;
Exception table:
from to target type
0 2 3 Class java.lang.Throwable
MethodParameters:
Name Flags
availableSequence final
private void notifyStart();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.lmax.disruptor.WorkProcessor.workHandler:Lcom/lmax/disruptor/WorkHandler;
instanceof com.lmax.disruptor.LifecycleAware
ifeq 5
1: aload 0
getfield com.lmax.disruptor.WorkProcessor.workHandler:Lcom/lmax/disruptor/WorkHandler;
checkcast com.lmax.disruptor.LifecycleAware
invokeinterface com.lmax.disruptor.LifecycleAware.onStart:()V
2: goto 5
3: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
start local 1 4: aload 0
getfield com.lmax.disruptor.WorkProcessor.exceptionHandler:Lcom/lmax/disruptor/ExceptionHandler;
aload 1
invokeinterface com.lmax.disruptor.ExceptionHandler.handleOnStartException:(Ljava/lang/Throwable;)V
end local 1 5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/lmax/disruptor/WorkProcessor<TT;>;
4 5 1 ex Ljava/lang/Throwable;
Exception table:
from to target type
1 2 3 Class java.lang.Throwable
private void notifyShutdown();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.lmax.disruptor.WorkProcessor.workHandler:Lcom/lmax/disruptor/WorkHandler;
instanceof com.lmax.disruptor.LifecycleAware
ifeq 5
1: aload 0
getfield com.lmax.disruptor.WorkProcessor.workHandler:Lcom/lmax/disruptor/WorkHandler;
checkcast com.lmax.disruptor.LifecycleAware
invokeinterface com.lmax.disruptor.LifecycleAware.onShutdown:()V
2: goto 5
3: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
start local 1 4: aload 0
getfield com.lmax.disruptor.WorkProcessor.exceptionHandler:Lcom/lmax/disruptor/ExceptionHandler;
aload 1
invokeinterface com.lmax.disruptor.ExceptionHandler.handleOnShutdownException:(Ljava/lang/Throwable;)V
end local 1 5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/lmax/disruptor/WorkProcessor<TT;>;
4 5 1 ex Ljava/lang/Throwable;
Exception table:
from to target type
1 2 3 Class java.lang.Throwable
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;Lcom/lmax/disruptor/EventProcessor;
SourceFile: "WorkProcessor.java"
NestMembers:
com.lmax.disruptor.WorkProcessor$1
InnerClasses:
com.lmax.disruptor.WorkProcessor$1