final class org.apache.lucene.index.DocumentsWriterPerThreadPool implements java.lang.Iterable<org.apache.lucene.index.DocumentsWriterPerThread>, java.io.Closeable
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.apache.lucene.index.DocumentsWriterPerThreadPool
super_class: java.lang.Object
{
private final java.util.Set<org.apache.lucene.index.DocumentsWriterPerThread> dwpts;
descriptor: Ljava/util/Set;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Set<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
private final java.util.Deque<org.apache.lucene.index.DocumentsWriterPerThread> freeList;
descriptor: Ljava/util/Deque;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Deque<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
private final java.util.function.Supplier<org.apache.lucene.index.DocumentsWriterPerThread> dwptFactory;
descriptor: Ljava/util/function/Supplier;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Supplier<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
private int takenWriterPermits;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private boolean closed;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
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/DocumentsWriterPerThreadPool;
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.DocumentsWriterPerThreadPool.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(java.util.function.Supplier<org.apache.lucene.index.DocumentsWriterPerThread>);
descriptor: (Ljava/util/function/Supplier;)V
flags: (0x0000)
Code:
stack=3, 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.IdentityHashMap
dup
invokespecial java.util.IdentityHashMap.<init>:()V
invokestatic java.util.Collections.newSetFromMap:(Ljava/util/Map;)Ljava/util/Set;
putfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwpts:Ljava/util/Set;
2: aload 0
new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
putfield org.apache.lucene.index.DocumentsWriterPerThreadPool.freeList:Ljava/util/Deque;
3: aload 0
iconst_0
putfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
4: aload 0
aload 1
putfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwptFactory:Ljava/util/function/Supplier;
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
0 6 1 dwptFactory Ljava/util/function/Supplier<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
Signature: (Ljava/util/function/Supplier<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;)V
MethodParameters:
Name Flags
dwptFactory
synchronized int size();
descriptor: ()I
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwpts:Ljava/util/Set;
invokeinterface java.util.Set.size:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
synchronized void lockNewWriters();
descriptor: ()V
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
start local 0 0: getstatic org.apache.lucene.index.DocumentsWriterPerThreadPool.$assertionsDisabled:Z
ifne 1
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
ifge 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
dup
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
iconst_1
iadd
putfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
synchronized void unlockNewWriters();
descriptor: ()V
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
start local 0 0: getstatic org.apache.lucene.index.DocumentsWriterPerThreadPool.$assertionsDisabled:Z
ifne 1
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
ifgt 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
dup
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
iconst_1
isub
putfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
2: aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
ifne 4
3: aload 0
invokevirtual java.lang.Object.notifyAll:()V
4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
private synchronized org.apache.lucene.index.DocumentsWriterPerThread newWriter();
descriptor: ()Lorg/apache/lucene/index/DocumentsWriterPerThread;
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=3, locals=2, args_size=1
start local 0 0: getstatic org.apache.lucene.index.DocumentsWriterPerThreadPool.$assertionsDisabled:Z
ifne 5
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
ifge 5
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.wait:()V
2: goto 5
StackMap locals:
StackMap stack: java.lang.InterruptedException
3: astore 1
start local 1 4: new org.apache.lucene.util.ThreadInterruptedException
dup
aload 1
invokespecial org.apache.lucene.util.ThreadInterruptedException.<init>:(Ljava/lang/InterruptedException;)V
athrow
end local 1 5: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.takenWriterPermits:I
ifgt 1
6: aload 0
invokevirtual org.apache.lucene.index.DocumentsWriterPerThreadPool.ensureOpen:()V
7: aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwptFactory:Ljava/util/function/Supplier;
invokeinterface java.util.function.Supplier.get:()Ljava/lang/Object;
checkcast org.apache.lucene.index.DocumentsWriterPerThread
astore 1
start local 1 8: aload 1
invokevirtual org.apache.lucene.index.DocumentsWriterPerThread.lock:()V
9: aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwpts:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
10: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
4 5 1 ie Ljava/lang/InterruptedException;
8 11 1 dwpt Lorg/apache/lucene/index/DocumentsWriterPerThread;
Exception table:
from to target type
1 2 3 Class java.lang.InterruptedException
org.apache.lucene.index.DocumentsWriterPerThread getAndLock();
descriptor: ()Lorg/apache/lucene/index/DocumentsWriterPerThread;
flags: (0x0000)
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
invokevirtual org.apache.lucene.index.DocumentsWriterPerThreadPool.ensureOpen:()V
2: aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.freeList:Ljava/util/Deque;
invokeinterface java.util.Deque.descendingIterator:()Ljava/util/Iterator;
astore 2
start local 2 3: goto 9
4: StackMap locals: org.apache.lucene.index.DocumentsWriterPerThreadPool java.util.Iterator
StackMap stack:
aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.lucene.index.DocumentsWriterPerThread
astore 3
start local 3 5: aload 3
invokevirtual org.apache.lucene.index.DocumentsWriterPerThread.tryLock:()Z
ifeq 9
6: aload 2
invokeinterface java.util.Iterator.remove:()V
7: aload 3
aload 1
monitorexit
8: areturn
end local 3 9: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
10: aload 0
invokevirtual org.apache.lucene.index.DocumentsWriterPerThreadPool.newWriter:()Lorg/apache/lucene/index/DocumentsWriterPerThread;
aload 1
monitorexit
11: areturn
end local 2 12: StackMap locals: org.apache.lucene.index.DocumentsWriterPerThreadPool org.apache.lucene.index.DocumentsWriterPerThreadPool
StackMap stack: java.lang.Throwable
aload 1
monitorexit
13: athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
3 12 2 descendingIterator Ljava/util/Iterator<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
5 9 3 perThread Lorg/apache/lucene/index/DocumentsWriterPerThread;
Exception table:
from to target type
1 8 12 any
9 11 12 any
12 13 12 any
private void ensureOpen();
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.DocumentsWriterPerThreadPool.closed:Z
ifeq 2
1: new org.apache.lucene.store.AlreadyClosedException
dup
ldc "DWPTPool is already closed"
invokespecial org.apache.lucene.store.AlreadyClosedException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
void marksAsFreeAndUnlock(org.apache.lucene.index.DocumentsWriterPerThread);
descriptor: (Lorg/apache/lucene/index/DocumentsWriterPerThread;)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
dup
astore 2
monitorenter
1: getstatic org.apache.lucene.index.DocumentsWriterPerThreadPool.$assertionsDisabled:Z
ifne 2
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwpts:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifne 2
new java.lang.AssertionError
dup
ldc "we tried to add a DWPT back to the pool but the pool doesn't know aobut this DWPT"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
2: StackMap locals: org.apache.lucene.index.DocumentsWriterPerThreadPool
StackMap stack:
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.freeList:Ljava/util/Deque;
aload 1
invokeinterface java.util.Deque.add:(Ljava/lang/Object;)Z
pop
3: aload 2
monitorexit
4: goto 7
StackMap locals:
StackMap stack: java.lang.Throwable
5: aload 2
monitorexit
6: athrow
7: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.apache.lucene.index.DocumentsWriterPerThread.unlock:()V
8: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
0 9 1 state Lorg/apache/lucene/index/DocumentsWriterPerThread;
Exception table:
from to target type
1 4 5 any
5 6 5 any
MethodParameters:
Name Flags
state
public synchronized java.util.Iterator<org.apache.lucene.index.DocumentsWriterPerThread> iterator();
descriptor: ()Ljava/util/Iterator;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwpts:Ljava/util/Set;
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwpts:Ljava/util/Set;
invokeinterface java.util.Set.size:()I
anewarray org.apache.lucene.index.DocumentsWriterPerThread
invokeinterface java.util.Set.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast org.apache.lucene.index.DocumentsWriterPerThread[]
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
Signature: ()Ljava/util/Iterator<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
java.util.List<org.apache.lucene.index.DocumentsWriterPerThread> filterAndLock(java.util.function.Predicate<org.apache.lucene.index.DocumentsWriterPerThread>);
descriptor: (Ljava/util/function/Predicate;)Ljava/util/List;
flags: (0x0000)
Code:
stack=2, locals=5, args_size=2
start local 0 start local 1 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 1: aload 0
invokevirtual org.apache.lucene.index.DocumentsWriterPerThreadPool.iterator:()Ljava/util/Iterator;
astore 4
goto 9
StackMap locals: org.apache.lucene.index.DocumentsWriterPerThreadPool java.util.function.Predicate java.util.List top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.lucene.index.DocumentsWriterPerThread
astore 3
start local 3 3: aload 1
aload 3
invokeinterface java.util.function.Predicate.test:(Ljava/lang/Object;)Z
ifeq 9
4: aload 3
invokevirtual org.apache.lucene.index.DocumentsWriterPerThread.lock:()V
5: aload 0
aload 3
invokevirtual org.apache.lucene.index.DocumentsWriterPerThreadPool.isRegistered:(Lorg/apache/lucene/index/DocumentsWriterPerThread;)Z
ifeq 8
6: aload 2
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
7: goto 9
8: StackMap locals: org.apache.lucene.index.DocumentsWriterPerThreadPool java.util.function.Predicate java.util.List org.apache.lucene.index.DocumentsWriterPerThread java.util.Iterator
StackMap stack:
aload 3
invokevirtual org.apache.lucene.index.DocumentsWriterPerThread.unlock:()V
end local 3 9: StackMap locals: org.apache.lucene.index.DocumentsWriterPerThreadPool java.util.function.Predicate java.util.List top java.util.Iterator
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
10: aload 2
invokestatic java.util.Collections.unmodifiableList:(Ljava/util/List;)Ljava/util/List;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
0 11 1 predicate Ljava/util/function/Predicate<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
1 11 2 list Ljava/util/List<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
3 9 3 perThread Lorg/apache/lucene/index/DocumentsWriterPerThread;
Signature: (Ljava/util/function/Predicate<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;)Ljava/util/List<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;
MethodParameters:
Name Flags
predicate
synchronized boolean checkout(org.apache.lucene.index.DocumentsWriterPerThread);
descriptor: (Lorg/apache/lucene/index/DocumentsWriterPerThread;)Z
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.apache.lucene.index.DocumentsWriterPerThreadPool.$assertionsDisabled:Z
ifne 1
aload 1
invokevirtual org.apache.lucene.index.DocumentsWriterPerThread.isHeldByCurrentThread:()Z
ifne 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwpts:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.remove:(Ljava/lang/Object;)Z
ifeq 4
2: aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.freeList:Ljava/util/Deque;
aload 1
invokeinterface java.util.Deque.remove:(Ljava/lang/Object;)Z
pop
3: goto 6
4: StackMap locals:
StackMap stack:
getstatic org.apache.lucene.index.DocumentsWriterPerThreadPool.$assertionsDisabled:Z
ifne 5
aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.freeList:Ljava/util/Deque;
aload 1
invokeinterface java.util.Deque.contains:(Ljava/lang/Object;)Z
ifeq 5
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
5: StackMap locals:
StackMap stack:
iconst_0
ireturn
6: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
0 7 1 perThread Lorg/apache/lucene/index/DocumentsWriterPerThread;
MethodParameters:
Name Flags
perThread
synchronized boolean isRegistered(org.apache.lucene.index.DocumentsWriterPerThread);
descriptor: (Lorg/apache/lucene/index/DocumentsWriterPerThread;)Z
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.lucene.index.DocumentsWriterPerThreadPool.dwpts:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
0 1 1 perThread Lorg/apache/lucene/index/DocumentsWriterPerThread;
MethodParameters:
Name Flags
perThread
public synchronized void close();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
putfield org.apache.lucene.index.DocumentsWriterPerThreadPool.closed:Z
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/lucene/index/DocumentsWriterPerThreadPool;
}
Signature: Ljava/lang/Object;Ljava/lang/Iterable<Lorg/apache/lucene/index/DocumentsWriterPerThread;>;Ljava/io/Closeable;
SourceFile: "DocumentsWriterPerThreadPool.java"