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: .line 309
            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 // org.apache.lucene.index.IndexWriter$EventQueue this
        start local 1 // org.apache.lucene.index.IndexWriter writer
         0: .line 318
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 314
            aload 0 /* this */
            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: .line 315
            aload 0 /* this */
            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: .line 319
            aload 0 /* this */
            aload 1 /* writer */
            putfield org.apache.lucene.index.IndexWriter$EventQueue.writer:Lorg/apache/lucene/index/IndexWriter;
         4: .line 320
            return
        end local 1 // org.apache.lucene.index.IndexWriter writer
        end local 0 // org.apache.lucene.index.IndexWriter$EventQueue this
      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 // org.apache.lucene.index.IndexWriter$EventQueue this
         0: .line 323
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            invokevirtual java.util.concurrent.Semaphore.tryAcquire:()Z
            ifne 2
         1: .line 324
            new org.apache.lucene.store.AlreadyClosedException
            dup
            ldc "queue is closed"
            invokespecial org.apache.lucene.store.AlreadyClosedException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 326
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.closed:Z
            ifeq 5
         3: .line 327
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            invokevirtual java.util.concurrent.Semaphore.release:()V
         4: .line 328
            new org.apache.lucene.store.AlreadyClosedException
            dup
            ldc "queue is closed"
            invokespecial org.apache.lucene.store.AlreadyClosedException.<init>:(Ljava/lang/String;)V
            athrow
         5: .line 330
      StackMap locals:
      StackMap stack:
            return
        end local 0 // org.apache.lucene.index.IndexWriter$EventQueue this
      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 // org.apache.lucene.index.IndexWriter$EventQueue this
        start local 1 // org.apache.lucene.index.IndexWriter$Event event
         0: .line 333
            aload 0 /* this */
            invokevirtual org.apache.lucene.index.IndexWriter$EventQueue.acquire:()V
         1: .line 335
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.queue:Ljava/util/Queue;
            aload 1 /* event */
            invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
            istore 3
         2: .line 337
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            invokevirtual java.util.concurrent.Semaphore.release:()V
         3: .line 335
            iload 3
            ireturn
         4: .line 336
      StackMap locals:
      StackMap stack: java.lang.Throwable
            astore 2
         5: .line 337
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            invokevirtual java.util.concurrent.Semaphore.release:()V
         6: .line 338
            aload 2
            athrow
        end local 1 // org.apache.lucene.index.IndexWriter$Event event
        end local 0 // org.apache.lucene.index.IndexWriter$EventQueue this
      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 // org.apache.lucene.index.IndexWriter$EventQueue this
         0: .line 342
            aload 0 /* this */
            invokevirtual org.apache.lucene.index.IndexWriter$EventQueue.acquire:()V
         1: .line 344
            aload 0 /* this */
            invokevirtual org.apache.lucene.index.IndexWriter$EventQueue.processEventsInternal:()V
         2: .line 345
            goto 6
      StackMap locals:
      StackMap stack: java.lang.Throwable
         3: astore 1
         4: .line 346
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            invokevirtual java.util.concurrent.Semaphore.release:()V
         5: .line 347
            aload 1
            athrow
         6: .line 346
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            invokevirtual java.util.concurrent.Semaphore.release:()V
         7: .line 348
            return
        end local 0 // org.apache.lucene.index.IndexWriter$EventQueue this
      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 // org.apache.lucene.index.IndexWriter$EventQueue this
         0: .line 351
            getstatic org.apache.lucene.index.IndexWriter$EventQueue.$assertionsDisabled:Z
            ifne 2
            ldc 2147483647
            aload 0 /* this */
            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 // org.apache.lucene.index.IndexWriter$Event event
         1: .line 354
      StackMap locals: org.apache.lucene.index.IndexWriter$Event
      StackMap stack:
            aload 1 /* event */
            aload 0 /* this */
            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 // org.apache.lucene.index.IndexWriter$Event event
         2: .line 353
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            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 /* event */
        start local 1 // org.apache.lucene.index.IndexWriter$Event event
         3: ifnonnull 1
         4: .line 356
            return
        end local 1 // org.apache.lucene.index.IndexWriter$Event event
        end local 0 // org.apache.lucene.index.IndexWriter$EventQueue this
      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 // org.apache.lucene.index.IndexWriter$EventQueue this
         0: .line 360
            getstatic org.apache.lucene.index.IndexWriter$EventQueue.$assertionsDisabled:Z
            ifne 1
            aload 0 /* this */
            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: .line 361
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            iconst_1
            putfield org.apache.lucene.index.IndexWriter$EventQueue.closed:Z
         2: .line 363
            aload 0 /* this */
            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: .line 365
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.queue:Ljava/util/Queue;
            invokeinterface java.util.Queue.clear:()V
         4: .line 366
            goto 15
         5: .line 369
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            ldc 2147483647
            invokevirtual java.util.concurrent.Semaphore.acquire:(I)V
         6: .line 370
            goto 9
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
         7: astore 1 /* e */
        start local 1 // java.lang.InterruptedException e
         8: .line 371
            new org.apache.lucene.util.ThreadInterruptedException
            dup
            aload 1 /* e */
            invokespecial org.apache.lucene.util.ThreadInterruptedException.<init>:(Ljava/lang/InterruptedException;)V
            athrow
        end local 1 // java.lang.InterruptedException e
         9: .line 374
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            invokevirtual org.apache.lucene.index.IndexWriter$EventQueue.processEventsInternal:()V
        10: .line 375
            goto 14
      StackMap locals:
      StackMap stack: java.lang.Throwable
        11: astore 1
        12: .line 376
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            ldc 2147483647
            invokevirtual java.util.concurrent.Semaphore.release:(I)V
        13: .line 377
            aload 1
            athrow
        14: .line 376
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.lucene.index.IndexWriter$EventQueue.permits:Ljava/util/concurrent/Semaphore;
            ldc 2147483647
            invokevirtual java.util.concurrent.Semaphore.release:(I)V
        15: .line 379
      StackMap locals:
      StackMap stack:
            return
        end local 0 // org.apache.lucene.index.IndexWriter$EventQueue this
      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