public class org.apache.lucene.index.MergeRateLimiter extends org.apache.lucene.store.RateLimiter
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.lucene.index.MergeRateLimiter
super_class: org.apache.lucene.store.RateLimiter
{
private static final int MIN_PAUSE_CHECK_MSEC;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 25
private static final long MIN_PAUSE_NS;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final long MAX_PAUSE_NS;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private volatile double mbPerSec;
descriptor: D
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private volatile long minPauseCheckBytes;
descriptor: J
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private long lastNS;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private java.util.concurrent.atomic.AtomicLong totalBytesWritten;
descriptor: Ljava/util/concurrent/atomic/AtomicLong;
flags: (0x0002) ACC_PRIVATE
private final org.apache.lucene.index.MergePolicy$OneMergeProgress mergeProgress;
descriptor: Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;
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=3, locals=0, args_size=0
0: ldc Lorg/apache/lucene/index/MergeRateLimiter;
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.MergeRateLimiter.$assertionsDisabled:Z
3: getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
ldc 2
invokevirtual java.util.concurrent.TimeUnit.toNanos:(J)J
putstatic org.apache.lucene.index.MergeRateLimiter.MIN_PAUSE_NS:J
4: getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
ldc 250
invokevirtual java.util.concurrent.TimeUnit.toNanos:(J)J
putstatic org.apache.lucene.index.MergeRateLimiter.MAX_PAUSE_NS:J
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(org.apache.lucene.index.MergePolicy$OneMergeProgress);
descriptor: (Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial org.apache.lucene.store.RateLimiter.<init>:()V
1: aload 0
new java.util.concurrent.atomic.AtomicLong
dup
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:()V
putfield org.apache.lucene.index.MergeRateLimiter.totalBytesWritten:Ljava/util/concurrent/atomic/AtomicLong;
2: aload 0
aload 1
putfield org.apache.lucene.index.MergeRateLimiter.mergeProgress:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;
3: aload 0
ldc Infinity
invokevirtual org.apache.lucene.index.MergeRateLimiter.setMBPerSec:(D)V
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/lucene/index/MergeRateLimiter;
0 5 1 mergeProgress Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;
MethodParameters:
Name Flags
mergeProgress
public void setMBPerSec(double);
descriptor: (D)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=2
start local 0 start local 1 0: aload 0
dup
astore 3
monitorenter
1: dload 1
dconst_0
dcmpg
ifge 3
2: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "mbPerSec must be positive; got: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
dload 1
invokevirtual java.lang.StringBuilder.append:(D)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: org.apache.lucene.index.MergeRateLimiter
StackMap stack:
aload 0
dload 1
putfield org.apache.lucene.index.MergeRateLimiter.mbPerSec:D
4: aload 0
ldc 1048576
ldc 0.025
dload 1
dmul
ldc 1024.0
dmul
ldc 1024.0
dmul
d2l
invokestatic java.lang.Math.min:(JJ)J
putfield org.apache.lucene.index.MergeRateLimiter.minPauseCheckBytes:J
5: getstatic org.apache.lucene.index.MergeRateLimiter.$assertionsDisabled:Z
ifne 6
aload 0
getfield org.apache.lucene.index.MergeRateLimiter.minPauseCheckBytes:J
lconst_0
lcmp
ifge 6
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
6: StackMap locals:
StackMap stack:
aload 3
monitorexit
7: goto 10
StackMap locals:
StackMap stack: java.lang.Throwable
8: aload 3
monitorexit
9: athrow
10: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.MergeRateLimiter.mergeProgress:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;
invokevirtual org.apache.lucene.index.MergePolicy$OneMergeProgress.wakeup:()V
11: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/apache/lucene/index/MergeRateLimiter;
0 12 1 mbPerSec D
Exception table:
from to target type
1 7 8 any
8 9 8 any
MethodParameters:
Name Flags
mbPerSec
public double getMBPerSec();
descriptor: ()D
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.mbPerSec:D
dreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/index/MergeRateLimiter;
public long getTotalBytesWritten();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.totalBytesWritten:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.get:()J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/index/MergeRateLimiter;
public long pause(long);
descriptor: (J)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.totalBytesWritten:Ljava/util/concurrent/atomic/AtomicLong;
lload 1
invokevirtual java.util.concurrent.atomic.AtomicLong.addAndGet:(J)J
pop2
1: lconst_0
lstore 3
start local 3 2: goto 4
start local 5 3: StackMap locals: long long
StackMap stack:
lload 3
lload 5
ladd
lstore 3
end local 5 4: StackMap locals:
StackMap stack:
aload 0
lload 1
invokestatic java.lang.System.nanoTime:()J
invokevirtual org.apache.lucene.index.MergeRateLimiter.maybePause:(JJ)J
dup2
lstore 5
start local 5 5: lconst_0
lcmp
ifge 3
6: lload 3
lreturn
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/lucene/index/MergeRateLimiter;
0 7 1 bytes J
2 7 3 paused J
3 4 5 delta J
5 7 5 delta J
Exceptions:
throws org.apache.lucene.index.MergePolicy$MergeAbortedException
MethodParameters:
Name Flags
bytes
public long getTotalStoppedNS();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.mergeProgress:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;
invokevirtual org.apache.lucene.index.MergePolicy$OneMergeProgress.getPauseTimes:()Ljava/util/Map;
getstatic org.apache.lucene.index.MergePolicy$OneMergeProgress$PauseReason.STOPPED:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress$PauseReason;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Long
invokevirtual java.lang.Long.longValue:()J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/index/MergeRateLimiter;
public long getTotalPausedNS();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.mergeProgress:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;
invokevirtual org.apache.lucene.index.MergePolicy$OneMergeProgress.getPauseTimes:()Ljava/util/Map;
getstatic org.apache.lucene.index.MergePolicy$OneMergeProgress$PauseReason.PAUSED:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress$PauseReason;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Long
invokevirtual java.lang.Long.longValue:()J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/index/MergeRateLimiter;
private long maybePause(long, long);
descriptor: (JJ)J
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=16, args_size=3
start local 0 start local 1 start local 3 0: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.mergeProgress:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;
invokevirtual org.apache.lucene.index.MergePolicy$OneMergeProgress.isAborted:()Z
ifeq 2
1: new org.apache.lucene.index.MergePolicy$MergeAbortedException
dup
ldc "Merge aborted."
invokespecial org.apache.lucene.index.MergePolicy$MergeAbortedException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.lucene.index.MergeRateLimiter.mbPerSec:D
dstore 5
start local 5 3: lload 1
l2d
ldc 1024.0
ddiv
ldc 1024.0
ddiv
dload 5
ddiv
dstore 7
start local 7 4: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.lastNS:J
ldc 1.0E9
dload 7
dmul
d2l
ladd
lstore 9
start local 9 5: lload 9
lload 3
lsub
lstore 11
start local 11 6: lload 11
getstatic org.apache.lucene.index.MergeRateLimiter.MIN_PAUSE_NS:J
lcmp
ifgt 9
7: aload 0
lload 3
putfield org.apache.lucene.index.MergeRateLimiter.lastNS:J
8: ldc -1
lreturn
9: StackMap locals: org.apache.lucene.index.MergeRateLimiter long long double double long long
StackMap stack:
lload 11
getstatic org.apache.lucene.index.MergeRateLimiter.MAX_PAUSE_NS:J
lcmp
ifle 11
10: getstatic org.apache.lucene.index.MergeRateLimiter.MAX_PAUSE_NS:J
lstore 11
11: StackMap locals:
StackMap stack:
invokestatic java.lang.System.nanoTime:()J
lstore 13
start local 13 12: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.mergeProgress:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress;
13: lload 11
14: dload 5
dconst_0
dcmpl
ifne 15
getstatic org.apache.lucene.index.MergePolicy$OneMergeProgress$PauseReason.STOPPED:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress$PauseReason;
goto 16
StackMap locals: org.apache.lucene.index.MergeRateLimiter long long double double long long long
StackMap stack: org.apache.lucene.index.MergePolicy$OneMergeProgress long
15: getstatic org.apache.lucene.index.MergePolicy$OneMergeProgress$PauseReason.PAUSED:Lorg/apache/lucene/index/MergePolicy$OneMergeProgress$PauseReason;
16: StackMap locals: org.apache.lucene.index.MergeRateLimiter long long double double long long long
StackMap stack: org.apache.lucene.index.MergePolicy$OneMergeProgress long org.apache.lucene.index.MergePolicy$OneMergeProgress$PauseReason
aload 0
dload 5
invokedynamic getAsBoolean(Lorg/apache/lucene/index/MergeRateLimiter;D)Ljava/util/function/BooleanSupplier;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()Z
org/apache/lucene/index/MergeRateLimiter.lambda$0(D)Z (7)
()Z
17: invokevirtual org.apache.lucene.index.MergePolicy$OneMergeProgress.pauseNanos:(JLorg/apache/lucene/index/MergePolicy$OneMergeProgress$PauseReason;Ljava/util/function/BooleanSupplier;)V
18: goto 21
StackMap locals:
StackMap stack: java.lang.InterruptedException
19: astore 15
start local 15 20: new org.apache.lucene.util.ThreadInterruptedException
dup
aload 15
invokespecial org.apache.lucene.util.ThreadInterruptedException.<init>:(Ljava/lang/InterruptedException;)V
athrow
end local 15 21: StackMap locals:
StackMap stack:
invokestatic java.lang.System.nanoTime:()J
lload 13
lsub
lreturn
end local 13 end local 11 end local 9 end local 7 end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lorg/apache/lucene/index/MergeRateLimiter;
0 22 1 bytes J
0 22 3 curNS J
3 22 5 rate D
4 22 7 secondsToPause D
5 22 9 targetNS J
6 22 11 curPauseNS J
12 22 13 start J
20 21 15 ie Ljava/lang/InterruptedException;
Exception table:
from to target type
12 18 19 Class java.lang.InterruptedException
Exceptions:
throws org.apache.lucene.index.MergePolicy$MergeAbortedException
MethodParameters:
Name Flags
bytes
curNS
public long getMinPauseCheckBytes();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.index.MergeRateLimiter.minPauseCheckBytes:J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/index/MergeRateLimiter;
private boolean lambda$0(double);
descriptor: (D)Z
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=4, locals=3, args_size=2
start local 0 0: dload 1
aload 0
getfield org.apache.lucene.index.MergeRateLimiter.mbPerSec:D
dcmpl
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/lucene/index/MergeRateLimiter;
}
SourceFile: "MergeRateLimiter.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public MergeAbortedException = org.apache.lucene.index.MergePolicy$MergeAbortedException of org.apache.lucene.index.MergePolicy
public OneMergeProgress = org.apache.lucene.index.MergePolicy$OneMergeProgress of org.apache.lucene.index.MergePolicy
public final PauseReason = org.apache.lucene.index.MergePolicy$OneMergeProgress$PauseReason of org.apache.lucene.index.MergePolicy$OneMergeProgress