final class org.apache.lucene.index.IndexWriter$EventQueue implements java.io.Closeable
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.apache.lucene.index.IndexWriter$EventQueue
super_class: java.lang.Object
{
private volatile boolean closed;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final java.util.concurrent.Semaphore permits;
descriptor: Ljava/util/concurrent/Semaphore;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Queue<org.apache.lucene.index.IndexWriter$Event> queue;
descriptor: Ljava/util/Queue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Queue<Lorg/apache/lucene/index/IndexWriter$Event;>;
private final org.apache.lucene.index.IndexWriter writer;
descriptor: Lorg/apache/lucene/index/IndexWriter;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
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/apache/lucene/index/IndexWriter;
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.apache.lucene.index.IndexWriter$EventQueue.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(org.apache.lucene.index.IndexWriter);
descriptor: (Lorg/apache/lucene/index/IndexWriter;)V
flags: (0x0000)
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.Semaphore
dup
ldc 2147483647
invokespecial java.util.concurrent.Semaphore.<init>:(I)V
putfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
2: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.apache.lucene.index.IndexWriter$EventQueue.queue:Ljava/util/Queue;
3: aload 0
aload 1
putfield org.apache.lucene.index.IndexWriter$EventQueue.writer:Lorg/apache/lucene/index/IndexWriter;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/lucene/index/IndexWriter$EventQueue;
0 5 1 writer Lorg/apache/lucene/index/IndexWriter;
MethodParameters:
Name Flags
writer
private void acquire();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.tryAcquire:()Z
ifne 2
1: new org.apache.lucene.store.AlreadyClosedException
dup
ldc "queue is closed"
invokespecial org.apache.lucene.store.AlreadyClosedException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.closed:Z
ifeq 5
3: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.release:()V
4: new org.apache.lucene.store.AlreadyClosedException
dup
ldc "queue is closed"
invokespecial org.apache.lucene.store.AlreadyClosedException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/lucene/index/IndexWriter$EventQueue;
boolean add(org.apache.lucene.index.IndexWriter$Event);
descriptor: (Lorg/apache/lucene/index/IndexWriter$Event;)Z
flags: (0x0000)
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.apache.lucene.index.IndexWriter$EventQueue.acquire:()V
1: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.queue:Ljava/util/Queue;
aload 1
invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
istore 3
2: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.release:()V
3: iload 3
ireturn
4: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
5: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.release:()V
6: aload 2
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/lucene/index/IndexWriter$EventQueue;
0 7 1 event Lorg/apache/lucene/index/IndexWriter$Event;
Exception table:
from to target type
1 2 4 any
MethodParameters:
Name Flags
event
void processEvents();
descriptor: ()V
flags: (0x0000)
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual org.apache.lucene.index.IndexWriter$EventQueue.acquire:()V
1: aload 0
invokevirtual org.apache.lucene.index.IndexWriter$EventQueue.processEventsInternal:()V
2: goto 6
StackMap locals:
StackMap stack: java.lang.Throwable
3: astore 1
4: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.release:()V
5: aload 1
athrow
6: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.release:()V
7: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/lucene/index/IndexWriter$EventQueue;
Exception table:
from to target type
1 3 3 any
Exceptions:
throws java.io.IOException
private void processEventsInternal();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: getstatic org.apache.lucene.index.IndexWriter$EventQueue.$assertionsDisabled:Z
ifne 2
ldc 2147483647
aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.availablePermits:()I
isub
ifgt 2
new java.lang.AssertionError
dup
ldc "must acquire a permit before processing events"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
start local 1 1: StackMap locals: org.apache.lucene.index.IndexWriter$Event
StackMap stack:
aload 1
aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.writer:Lorg/apache/lucene/index/IndexWriter;
invokeinterface org.apache.lucene.index.IndexWriter$Event.process:(Lorg/apache/lucene/index/IndexWriter;)V
end local 1 2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.queue:Ljava/util/Queue;
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast org.apache.lucene.index.IndexWriter$Event
dup
astore 1
start local 1 3: ifnonnull 1
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/lucene/index/IndexWriter$EventQueue;
1 2 1 event Lorg/apache/lucene/index/IndexWriter$Event;
3 5 1 event Lorg/apache/lucene/index/IndexWriter$Event;
Exceptions:
throws java.io.IOException
public synchronized void close();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=2, args_size=1
start local 0 0: getstatic org.apache.lucene.index.IndexWriter$EventQueue.$assertionsDisabled:Z
ifne 1
aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.closed:Z
ifeq 1
new java.lang.AssertionError
dup
ldc "we should never close this twice"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
1: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield org.apache.lucene.index.IndexWriter$EventQueue.closed:Z
2: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.writer:Lorg/apache/lucene/index/IndexWriter;
invokevirtual org.apache.lucene.index.IndexWriter.getTragicException:()Ljava/lang/Throwable;
ifnull 5
3: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.queue:Ljava/util/Queue;
invokeinterface java.util.Queue.clear:()V
4: goto 15
5: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
ldc 2147483647
invokevirtual java.util.concurrent.Semaphore.acquire:(I)V
6: goto 9
StackMap locals:
StackMap stack: java.lang.InterruptedException
7: astore 1
start local 1 8: new org.apache.lucene.util.ThreadInterruptedException
dup
aload 1
invokespecial org.apache.lucene.util.ThreadInterruptedException.<init>:(Ljava/lang/InterruptedException;)V
athrow
end local 1 9: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.apache.lucene.index.IndexWriter$EventQueue.processEventsInternal:()V
10: goto 14
StackMap locals:
StackMap stack: java.lang.Throwable
11: astore 1
12: aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
ldc 2147483647
invokevirtual java.util.concurrent.Semaphore.release:(I)V
13: aload 1
athrow
14: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
ldc 2147483647
invokevirtual java.util.concurrent.Semaphore.release:(I)V
15: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/apache/lucene/index/IndexWriter$EventQueue;
8 9 1 e Ljava/lang/InterruptedException;
Exception table:
from to target type
5 6 7 Class java.lang.InterruptedException
9 11 11 any
Exceptions:
throws java.io.IOException
}
SourceFile: "IndexWriter.java"
NestHost: org.apache.lucene.index.IndexWriter
InnerClasses:
abstract Event = org.apache.lucene.index.IndexWriter$Event of org.apache.lucene.index.IndexWriter
final EventQueue = org.apache.lucene.index.IndexWriter$EventQueue of org.apache.lucene.index.IndexWriter