public final class io.reactivex.internal.queue.SpscArrayQueue<E> extends java.util.concurrent.atomic.AtomicReferenceArray<E> implements io.reactivex.internal.fuseable.SimplePlainQueue<E>
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: io.reactivex.internal.queue.SpscArrayQueue
super_class: java.util.concurrent.atomic.AtomicReferenceArray
{
private static final long serialVersionUID;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: -1296597691183856449
private static final java.lang.Integer MAX_LOOK_AHEAD_STEP;
descriptor: Ljava/lang/Integer;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
final int mask;
descriptor: I
flags: (0x0010) ACC_FINAL
final java.util.concurrent.atomic.AtomicLong producerIndex;
descriptor: Ljava/util/concurrent/atomic/AtomicLong;
flags: (0x0010) ACC_FINAL
long producerLookAhead;
descriptor: J
flags: (0x0000)
final java.util.concurrent.atomic.AtomicLong consumerIndex;
descriptor: Ljava/util/concurrent/atomic/AtomicLong;
flags: (0x0010) ACC_FINAL
final int lookAheadStep;
descriptor: I
flags: (0x0010) ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc "jctools.spsc.max.lookahead.step"
sipush 4096
invokestatic java.lang.Integer.getInteger:(Ljava/lang/String;I)Ljava/lang/Integer;
putstatic io.reactivex.internal.queue.SpscArrayQueue.MAX_LOOK_AHEAD_STEP:Ljava/lang/Integer;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
invokestatic io.reactivex.internal.util.Pow2.roundToPowerOfTwo:(I)I
invokespecial java.util.concurrent.atomic.AtomicReferenceArray.<init>:(I)V
1: aload 0
aload 0
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.length:()I
iconst_1
isub
putfield io.reactivex.internal.queue.SpscArrayQueue.mask:I
2: aload 0
new java.util.concurrent.atomic.AtomicLong
dup
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:()V
putfield io.reactivex.internal.queue.SpscArrayQueue.producerIndex:Ljava/util/concurrent/atomic/AtomicLong;
3: aload 0
new java.util.concurrent.atomic.AtomicLong
dup
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:()V
putfield io.reactivex.internal.queue.SpscArrayQueue.consumerIndex:Ljava/util/concurrent/atomic/AtomicLong;
4: aload 0
iload 1
iconst_4
idiv
getstatic io.reactivex.internal.queue.SpscArrayQueue.MAX_LOOK_AHEAD_STEP:Ljava/lang/Integer;
invokevirtual java.lang.Integer.intValue:()I
invokestatic java.lang.Math.min:(II)I
putfield io.reactivex.internal.queue.SpscArrayQueue.lookAheadStep:I
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 6 1 capacity I
MethodParameters:
Name Flags
capacity
public boolean offer();
descriptor: (Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=7, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.lang.NullPointerException
dup
ldc "Null is not a valid element"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.mask:I
istore 2
start local 2 3: aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.producerIndex:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.get:()J
lstore 3
start local 3 4: aload 0
lload 3
iload 2
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.calcElementOffset:(JI)I
istore 5
start local 5 5: lload 3
aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.producerLookAhead:J
lcmp
iflt 12
6: aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.lookAheadStep:I
istore 6
start local 6 7: aload 0
aload 0
lload 3
iload 6
i2l
ladd
iload 2
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.calcElementOffset:(JI)I
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.lvElement:(I)Ljava/lang/Object;
ifnonnull 10
8: aload 0
lload 3
iload 6
i2l
ladd
putfield io.reactivex.internal.queue.SpscArrayQueue.producerLookAhead:J
9: goto 12
StackMap locals: io.reactivex.internal.queue.SpscArrayQueue java.lang.Object int long int int
StackMap stack:
10: aload 0
iload 5
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.lvElement:(I)Ljava/lang/Object;
ifnull 12
11: iconst_0
ireturn
end local 6 12: StackMap locals:
StackMap stack:
aload 0
iload 5
aload 1
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.soElement:(ILjava/lang/Object;)V
13: aload 0
lload 3
lconst_1
ladd
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.soProducerIndex:(J)V
14: iconst_1
ireturn
end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 15 1 e TE;
3 15 2 mask I
4 15 3 index J
5 15 5 offset I
7 12 6 step I
Signature: (TE;)Z
MethodParameters:
Name Flags
e
public boolean offer(E, );
descriptor: (Ljava/lang/Object;Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.offer:(Ljava/lang/Object;)Z
ifeq 1
aload 0
aload 2
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.offer:(Ljava/lang/Object;)Z
ifeq 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 2 1 v1 TE;
0 2 2 v2 TE;
Signature: (TE;TE;)Z
MethodParameters:
Name Flags
v1
v2
public E poll();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=1
start local 0 0: aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.consumerIndex:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.get:()J
lstore 1
start local 1 1: aload 0
lload 1
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.calcElementOffset:(J)I
istore 3
start local 3 2: aload 0
iload 3
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.lvElement:(I)Ljava/lang/Object;
astore 4
start local 4 3: aload 4
ifnonnull 5
4: aconst_null
areturn
5: StackMap locals: long int java.lang.Object
StackMap stack:
aload 0
lload 1
lconst_1
ladd
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.soConsumerIndex:(J)V
6: aload 0
iload 3
aconst_null
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.soElement:(ILjava/lang/Object;)V
7: aload 4
areturn
end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
1 8 1 index J
2 8 3 offset I
3 8 4 e TE;
Signature: ()TE;
RuntimeInvisibleAnnotations:
io.reactivex.annotations.Nullable()
public boolean isEmpty();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.producerIndex:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.get:()J
aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.consumerIndex:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.get:()J
lcmp
ifne 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 Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
void soProducerIndex(long);
descriptor: (J)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.producerIndex:Ljava/util/concurrent/atomic/AtomicLong;
lload 1
invokevirtual java.util.concurrent.atomic.AtomicLong.lazySet:(J)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 2 1 newIndex J
MethodParameters:
Name Flags
newIndex
void soConsumerIndex(long);
descriptor: (J)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.consumerIndex:Ljava/util/concurrent/atomic/AtomicLong;
lload 1
invokevirtual java.util.concurrent.atomic.AtomicLong.lazySet:(J)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 2 1 newIndex J
MethodParameters:
Name Flags
newIndex
public void clear();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
aload 0
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.poll:()Ljava/lang/Object;
ifnonnull 0
aload 0
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.isEmpty:()Z
ifeq 0
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
int calcElementOffset(long, int);
descriptor: (JI)I
flags: (0x0000)
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 3 0: lload 1
l2i
iload 3
iand
ireturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 1 1 index J
0 1 3 mask I
MethodParameters:
Name Flags
index
mask
int calcElementOffset(long);
descriptor: (J)I
flags: (0x0000)
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: lload 1
l2i
aload 0
getfield io.reactivex.internal.queue.SpscArrayQueue.mask:I
iand
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 1 1 index J
MethodParameters:
Name Flags
index
void soElement(int, );
descriptor: (ILjava/lang/Object;)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
iload 1
aload 2
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.lazySet:(ILjava/lang/Object;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 2 1 offset I
0 2 2 value TE;
Signature: (ITE;)V
MethodParameters:
Name Flags
offset
value
E lvElement();
descriptor: (I)Ljava/lang/Object;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
invokevirtual io.reactivex.internal.queue.SpscArrayQueue.get:(I)Ljava/lang/Object;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/reactivex/internal/queue/SpscArrayQueue<TE;>;
0 1 1 offset I
Signature: (I)TE;
MethodParameters:
Name Flags
offset
}
Signature: <E:Ljava/lang/Object;>Ljava/util/concurrent/atomic/AtomicReferenceArray<TE;>;Lio/reactivex/internal/fuseable/SimplePlainQueue<TE;>;
SourceFile: "SpscArrayQueue.java"