public final class com.lmax.disruptor.BatchEventProcessor<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.BatchEventProcessor
super_class: java.lang.Object
{
private static final int IDLE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 0
private static final int HALTED;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1
private static final int RUNNING;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2
private final java.util.concurrent.atomic.AtomicInteger running;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private com.lmax.disruptor.ExceptionHandler<? super T> exceptionHandler;
descriptor: Lcom/lmax/disruptor/ExceptionHandler;
flags: (0x0002) ACC_PRIVATE
Signature: Lcom/lmax/disruptor/ExceptionHandler<-TT;>;
private final com.lmax.disruptor.DataProvider<T> dataProvider;
descriptor: Lcom/lmax/disruptor/DataProvider;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/lmax/disruptor/DataProvider<TT;>;
private final com.lmax.disruptor.SequenceBarrier sequenceBarrier;
descriptor: Lcom/lmax/disruptor/SequenceBarrier;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.lmax.disruptor.EventHandler<? super T> eventHandler;
descriptor: Lcom/lmax/disruptor/EventHandler;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/lmax/disruptor/EventHandler<-TT;>;
private final com.lmax.disruptor.Sequence sequence;
descriptor: Lcom/lmax/disruptor/Sequence;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.lmax.disruptor.TimeoutHandler timeoutHandler;
descriptor: Lcom/lmax/disruptor/TimeoutHandler;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.lmax.disruptor.BatchStartAware batchStartAware;
descriptor: Lcom/lmax/disruptor/BatchStartAware;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(com.lmax.disruptor.DataProvider<T>, com.lmax.disruptor.SequenceBarrier, com.lmax.disruptor.EventHandler<? super T>);
descriptor: (Lcom/lmax/disruptor/DataProvider;Lcom/lmax/disruptor/SequenceBarrier;Lcom/lmax/disruptor/EventHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
iconst_0
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield com.lmax.disruptor.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
2: aload 0
new com.lmax.disruptor.FatalExceptionHandler
dup
invokespecial com.lmax.disruptor.FatalExceptionHandler.<init>:()V
putfield com.lmax.disruptor.BatchEventProcessor.exceptionHandler:Lcom/lmax/disruptor/ExceptionHandler;
3: aload 0
new com.lmax.disruptor.Sequence
dup
ldc -1
invokespecial com.lmax.disruptor.Sequence.<init>:(J)V
putfield com.lmax.disruptor.BatchEventProcessor.sequence:Lcom/lmax/disruptor/Sequence;
4: aload 0
aload 1
putfield com.lmax.disruptor.BatchEventProcessor.dataProvider:Lcom/lmax/disruptor/DataProvider;
5: aload 0
aload 2
putfield com.lmax.disruptor.BatchEventProcessor.sequenceBarrier:Lcom/lmax/disruptor/SequenceBarrier;
6: aload 0
aload 3
putfield com.lmax.disruptor.BatchEventProcessor.eventHandler:Lcom/lmax/disruptor/EventHandler;
7: aload 3
instanceof com.lmax.disruptor.SequenceReportingEventHandler
ifeq 9
8: aload 3
checkcast com.lmax.disruptor.SequenceReportingEventHandler
aload 0
getfield com.lmax.disruptor.BatchEventProcessor.sequence:Lcom/lmax/disruptor/Sequence;
invokeinterface com.lmax.disruptor.SequenceReportingEventHandler.setSequenceCallback:(Lcom/lmax/disruptor/Sequence;)V
9: StackMap locals: com.lmax.disruptor.BatchEventProcessor com.lmax.disruptor.DataProvider com.lmax.disruptor.SequenceBarrier com.lmax.disruptor.EventHandler
StackMap stack:
aload 0
10: aload 3
instanceof com.lmax.disruptor.BatchStartAware
ifeq 11
aload 3
checkcast com.lmax.disruptor.BatchStartAware
goto 12
StackMap locals:
StackMap stack: com.lmax.disruptor.BatchEventProcessor
11: aconst_null
12: StackMap locals: com.lmax.disruptor.BatchEventProcessor com.lmax.disruptor.DataProvider com.lmax.disruptor.SequenceBarrier com.lmax.disruptor.EventHandler
StackMap stack: com.lmax.disruptor.BatchEventProcessor com.lmax.disruptor.BatchStartAware
putfield com.lmax.disruptor.BatchEventProcessor.batchStartAware:Lcom/lmax/disruptor/BatchStartAware;
13: aload 0
14: aload 3
instanceof com.lmax.disruptor.TimeoutHandler
ifeq 15
aload 3
checkcast com.lmax.disruptor.TimeoutHandler
goto 16
StackMap locals:
StackMap stack: com.lmax.disruptor.BatchEventProcessor
15: aconst_null
16: StackMap locals: com.lmax.disruptor.BatchEventProcessor com.lmax.disruptor.DataProvider com.lmax.disruptor.SequenceBarrier com.lmax.disruptor.EventHandler
StackMap stack: com.lmax.disruptor.BatchEventProcessor com.lmax.disruptor.TimeoutHandler
putfield com.lmax.disruptor.BatchEventProcessor.timeoutHandler:Lcom/lmax/disruptor/TimeoutHandler;
17: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Lcom/lmax/disruptor/BatchEventProcessor<TT;>;
0 18 1 dataProvider Lcom/lmax/disruptor/DataProvider<TT;>;
0 18 2 sequenceBarrier Lcom/lmax/disruptor/SequenceBarrier;
0 18 3 eventHandler Lcom/lmax/disruptor/EventHandler<-TT;>;
Signature: (Lcom/lmax/disruptor/DataProvider<TT;>;Lcom/lmax/disruptor/SequenceBarrier;Lcom/lmax/disruptor/EventHandler<-TT;>;)V
MethodParameters:
Name Flags
dataProvider final
sequenceBarrier final
eventHandler 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.BatchEventProcessor.sequence:Lcom/lmax/disruptor/Sequence;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/lmax/disruptor/BatchEventProcessor<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.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicInteger.set:(I)V
1: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.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/BatchEventProcessor<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.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
ifeq 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/lmax/disruptor/BatchEventProcessor<TT;>;
public void setExceptionHandler(com.lmax.disruptor.ExceptionHandler<? super T>);
descriptor: (Lcom/lmax/disruptor/ExceptionHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield com.lmax.disruptor.BatchEventProcessor.exceptionHandler:Lcom/lmax/disruptor/ExceptionHandler;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/lmax/disruptor/BatchEventProcessor<TT;>;
0 4 1 exceptionHandler Lcom/lmax/disruptor/ExceptionHandler<-TT;>;
Signature: (Lcom/lmax/disruptor/ExceptionHandler<-TT;>;)V
MethodParameters:
Name Flags
exceptionHandler final
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
iconst_2
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 13
1: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.sequenceBarrier:Lcom/lmax/disruptor/SequenceBarrier;
invokeinterface com.lmax.disruptor.SequenceBarrier.clearAlert:()V
2: aload 0
invokevirtual com.lmax.disruptor.BatchEventProcessor.notifyStart:()V
3: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
iconst_2
if_icmpne 10
4: aload 0
invokevirtual com.lmax.disruptor.BatchEventProcessor.processEvents:()V
5: goto 10
6: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
7: aload 0
invokevirtual com.lmax.disruptor.BatchEventProcessor.notifyShutdown:()V
8: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicInteger.set:(I)V
9: aload 1
athrow
10: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.lmax.disruptor.BatchEventProcessor.notifyShutdown:()V
11: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicInteger.set:(I)V
12: goto 16
13: StackMap locals:
StackMap stack:
aload 0
getfield com.lmax.disruptor.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
iconst_2
if_icmpne 15
14: new java.lang.IllegalStateException
dup
ldc "Thread is already running"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.lmax.disruptor.BatchEventProcessor.earlyExit:()V
16: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lcom/lmax/disruptor/BatchEventProcessor<TT;>;
Exception table:
from to target type
3 6 6 any
private void processEvents();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=6, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.sequence:Lcom/lmax/disruptor/Sequence;
invokevirtual com.lmax.disruptor.Sequence.get:()J
lconst_1
ladd
lstore 2
start local 2 2: StackMap locals: java.lang.Object long
StackMap stack:
aload 0
getfield com.lmax.disruptor.BatchEventProcessor.sequenceBarrier:Lcom/lmax/disruptor/SequenceBarrier;
lload 2
invokeinterface com.lmax.disruptor.SequenceBarrier.waitFor:(J)J
lstore 4
start local 4 3: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.batchStartAware:Lcom/lmax/disruptor/BatchStartAware;
ifnull 11
4: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.batchStartAware:Lcom/lmax/disruptor/BatchStartAware;
lload 4
lload 2
lsub
lconst_1
ladd
invokeinterface com.lmax.disruptor.BatchStartAware.onBatchStart:(J)V
5: goto 11
6: StackMap locals: long
StackMap stack:
aload 0
getfield com.lmax.disruptor.BatchEventProcessor.dataProvider:Lcom/lmax/disruptor/DataProvider;
lload 2
invokeinterface com.lmax.disruptor.DataProvider.get:(J)Ljava/lang/Object;
astore 1
7: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.eventHandler:Lcom/lmax/disruptor/EventHandler;
aload 1
lload 2
lload 2
lload 4
lcmp
ifne 8
iconst_1
goto 9
StackMap locals: com.lmax.disruptor.BatchEventProcessor java.lang.Object long long
StackMap stack: com.lmax.disruptor.EventHandler java.lang.Object long
8: iconst_0
StackMap locals: com.lmax.disruptor.BatchEventProcessor java.lang.Object long long
StackMap stack: com.lmax.disruptor.EventHandler java.lang.Object long int
9: invokeinterface com.lmax.disruptor.EventHandler.onEvent:(Ljava/lang/Object;JZ)V
10: lload 2
lconst_1
ladd
lstore 2
11: StackMap locals:
StackMap stack:
lload 2
lload 4
lcmp
ifle 6
12: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.sequence:Lcom/lmax/disruptor/Sequence;
lload 4
invokevirtual com.lmax.disruptor.Sequence.set:(J)V
end local 4 13: goto 2
14: StackMap locals: com.lmax.disruptor.BatchEventProcessor java.lang.Object long
StackMap stack: com.lmax.disruptor.TimeoutException
pop
15: aload 0
aload 0
getfield com.lmax.disruptor.BatchEventProcessor.sequence:Lcom/lmax/disruptor/Sequence;
invokevirtual com.lmax.disruptor.Sequence.get:()J
invokevirtual com.lmax.disruptor.BatchEventProcessor.notifyTimeout:(J)V
goto 2
16: StackMap locals:
StackMap stack: com.lmax.disruptor.AlertException
pop
17: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.running:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
iconst_2
if_icmpeq 2
18: goto 24
19: StackMap locals:
StackMap stack: java.lang.Throwable
astore 4
start local 4 20: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.exceptionHandler:Lcom/lmax/disruptor/ExceptionHandler;
aload 4
lload 2
aload 1
invokeinterface com.lmax.disruptor.ExceptionHandler.handleEventException:(Ljava/lang/Throwable;JLjava/lang/Object;)V
21: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.sequence:Lcom/lmax/disruptor/Sequence;
lload 2
invokevirtual com.lmax.disruptor.Sequence.set:(J)V
22: lload 2
lconst_1
ladd
lstore 2
end local 4 23: goto 2
24: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lcom/lmax/disruptor/BatchEventProcessor<TT;>;
1 25 1 event TT;
2 25 2 nextSequence J
3 13 4 availableSequence J
20 23 4 ex Ljava/lang/Throwable;
Exception table:
from to target type
2 13 14 Class com.lmax.disruptor.TimeoutException
2 13 16 Class com.lmax.disruptor.AlertException
2 13 19 Class java.lang.Throwable
private void earlyExit();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.lmax.disruptor.BatchEventProcessor.notifyStart:()V
1: aload 0
invokevirtual com.lmax.disruptor.BatchEventProcessor.notifyShutdown:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/lmax/disruptor/BatchEventProcessor<TT;>;
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.BatchEventProcessor.timeoutHandler:Lcom/lmax/disruptor/TimeoutHandler;
ifnull 5
1: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.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.BatchEventProcessor.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/BatchEventProcessor<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.BatchEventProcessor.eventHandler:Lcom/lmax/disruptor/EventHandler;
instanceof com.lmax.disruptor.LifecycleAware
ifeq 5
1: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.eventHandler:Lcom/lmax/disruptor/EventHandler;
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.BatchEventProcessor.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/BatchEventProcessor<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.BatchEventProcessor.eventHandler:Lcom/lmax/disruptor/EventHandler;
instanceof com.lmax.disruptor.LifecycleAware
ifeq 5
1: aload 0
getfield com.lmax.disruptor.BatchEventProcessor.eventHandler:Lcom/lmax/disruptor/EventHandler;
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.BatchEventProcessor.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/BatchEventProcessor<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: "BatchEventProcessor.java"