public class org.apache.dubbo.common.timer.HashedWheelTimer extends java.lang.Object implements org.apache.dubbo.common.timer.Timer
{
public static final java.lang.String NAME;
private static final org.apache.dubbo.common.logger.Logger logger;
private static final java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNTER;
private static final java.util.concurrent.atomic.AtomicBoolean WARNED_TOO_MANY_INSTANCES;
private static final int INSTANCE_COUNT_LIMIT;
private static final java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER;
private final org.apache.dubbo.common.timer.HashedWheelTimer$Worker worker;
private final java.lang.Thread workerThread;
private static final int WORKER_STATE_INIT;
private static final int WORKER_STATE_STARTED;
private static final int WORKER_STATE_SHUTDOWN;
private volatile int workerState;
private final long tickDuration;
private final org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] wheel;
private final int mask;
private final java.util.concurrent.CountDownLatch startTimeInitialized;
private final java.util.Queue timeouts;
private final java.util.Queue cancelledTimeouts;
private final java.util.concurrent.atomic.AtomicLong pendingTimeouts;
private final long maxPendingTimeouts;
private volatile long startTime;
private static final boolean IS_OS_WINDOWS;
public void <init>()
{
java.util.concurrent.ThreadFactory v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v = staticinvoke <java.util.concurrent.Executors: java.util.concurrent.ThreadFactory defaultThreadFactory()>();
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer: void <init>(java.util.concurrent.ThreadFactory)>(v);
return;
}
public void <init>(long, java.util.concurrent.TimeUnit)
{
java.util.concurrent.TimeUnit v;
long v;
java.util.concurrent.ThreadFactory v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v := @parameter: long;
v := @parameter: java.util.concurrent.TimeUnit;
v = staticinvoke <java.util.concurrent.Executors: java.util.concurrent.ThreadFactory defaultThreadFactory()>();
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer: void <init>(java.util.concurrent.ThreadFactory,long,java.util.concurrent.TimeUnit)>(v, v, v);
return;
}
public void <init>(long, java.util.concurrent.TimeUnit, int)
{
java.util.concurrent.TimeUnit v;
int v;
long v;
java.util.concurrent.ThreadFactory v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v := @parameter: long;
v := @parameter: java.util.concurrent.TimeUnit;
v := @parameter: int;
v = staticinvoke <java.util.concurrent.Executors: java.util.concurrent.ThreadFactory defaultThreadFactory()>();
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer: void <init>(java.util.concurrent.ThreadFactory,long,java.util.concurrent.TimeUnit,int)>(v, v, v, v);
return;
}
public void <init>(java.util.concurrent.ThreadFactory)
{
java.util.concurrent.TimeUnit v;
java.util.concurrent.ThreadFactory v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v := @parameter: java.util.concurrent.ThreadFactory;
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit MILLISECONDS>;
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer: void <init>(java.util.concurrent.ThreadFactory,long,java.util.concurrent.TimeUnit)>(v, 100L, v);
return;
}
public void <init>(java.util.concurrent.ThreadFactory, long, java.util.concurrent.TimeUnit)
{
java.util.concurrent.TimeUnit v;
long v;
java.util.concurrent.ThreadFactory v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v := @parameter: java.util.concurrent.ThreadFactory;
v := @parameter: long;
v := @parameter: java.util.concurrent.TimeUnit;
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer: void <init>(java.util.concurrent.ThreadFactory,long,java.util.concurrent.TimeUnit,int)>(v, v, v, 512);
return;
}
public void <init>(java.util.concurrent.ThreadFactory, long, java.util.concurrent.TimeUnit, int)
{
java.util.concurrent.TimeUnit v;
int v;
long v;
java.util.concurrent.ThreadFactory v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v := @parameter: java.util.concurrent.ThreadFactory;
v := @parameter: long;
v := @parameter: java.util.concurrent.TimeUnit;
v := @parameter: int;
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer: void <init>(java.util.concurrent.ThreadFactory,long,java.util.concurrent.TimeUnit,int,long)>(v, v, v, v, -1L);
return;
}
public void <init>(java.util.concurrent.ThreadFactory, long, java.util.concurrent.TimeUnit, int, long)
{
org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] v, v, v, v;
java.lang.NullPointerException v, v;
byte v, v;
java.lang.Long v, v;
java.util.concurrent.atomic.AtomicInteger v;
java.lang.Thread v;
java.util.concurrent.ThreadFactory v;
org.apache.dubbo.common.timer.HashedWheelTimer$Worker v, v;
boolean v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
java.util.concurrent.LinkedBlockingQueue v, v;
java.util.concurrent.CountDownLatch v;
java.lang.Object[] v;
java.util.concurrent.atomic.AtomicBoolean v;
long v, v, v, v, v, v;
int v, v, v, v, v, v;
java.lang.String v, v, v;
java.lang.IllegalArgumentException v, v, v;
java.util.concurrent.TimeUnit v;
java.util.concurrent.atomic.AtomicLong v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v := @parameter: java.util.concurrent.ThreadFactory;
v := @parameter: long;
v := @parameter: java.util.concurrent.TimeUnit;
v := @parameter: int;
v := @parameter: long;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new org.apache.dubbo.common.timer.HashedWheelTimer$Worker;
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer$Worker: void <init>(org.apache.dubbo.common.timer.HashedWheelTimer)>(v);
v.<org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.timer.HashedWheelTimer$Worker worker> = v;
v = new java.util.concurrent.CountDownLatch;
specialinvoke v.<java.util.concurrent.CountDownLatch: void <init>(int)>(1);
v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.CountDownLatch startTimeInitialized> = v;
v = new java.util.concurrent.LinkedBlockingQueue;
specialinvoke v.<java.util.concurrent.LinkedBlockingQueue: void <init>()>();
v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.Queue timeouts> = v;
v = new java.util.concurrent.LinkedBlockingQueue;
specialinvoke v.<java.util.concurrent.LinkedBlockingQueue: void <init>()>();
v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.Queue cancelledTimeouts> = v;
v = new java.util.concurrent.atomic.AtomicLong;
specialinvoke v.<java.util.concurrent.atomic.AtomicLong: void <init>(long)>(0L);
v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicLong pendingTimeouts> = v;
if v != null goto label;
v = new java.lang.NullPointerException;
specialinvoke v.<java.lang.NullPointerException: void <init>(java.lang.String)>("threadFactory");
throw v;
label:
if v != null goto label;
v = new java.lang.NullPointerException;
specialinvoke v.<java.lang.NullPointerException: void <init>(java.lang.String)>("unit");
throw v;
label:
v = v cmp 0L;
if v > 0 goto label;
v = new java.lang.IllegalArgumentException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (long)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("tickDuration must be greater than 0: \u0001");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
if v > 0 goto label;
v = new java.lang.IllegalArgumentException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("ticksPerWheel must be greater than 0: \u0001");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
v = staticinvoke <org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] createWheel(int)>(v);
v.<org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] wheel> = v;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] wheel>;
v = lengthof v;
v = v - 1;
v.<org.apache.dubbo.common.timer.HashedWheelTimer: int mask> = v;
v = virtualinvoke v.<java.util.concurrent.TimeUnit: long toNanos(long)>(v);
v.<org.apache.dubbo.common.timer.HashedWheelTimer: long tickDuration> = v;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: long tickDuration>;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] wheel>;
v = lengthof v;
v = 9223372036854775807L / v;
v = v cmp v;
if v < 0 goto label;
v = new java.lang.IllegalArgumentException;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] wheel>;
v = lengthof v;
v = 9223372036854775807L / v;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[1] = v;
v = staticinvoke <java.lang.String: java.lang.String format(java.lang.String,java.lang.Object[])>("tickDuration: %d (expected: 0 < tickDuration in nanos < %d", v);
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.timer.HashedWheelTimer$Worker worker>;
v = interfaceinvoke v.<java.util.concurrent.ThreadFactory: java.lang.Thread newThread(java.lang.Runnable)>(v);
v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.lang.Thread workerThread> = v;
v.<org.apache.dubbo.common.timer.HashedWheelTimer: long maxPendingTimeouts> = v;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNTER>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int incrementAndGet()>();
if v <= 64 goto label;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicBoolean WARNED_TOO_MANY_INSTANCES>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicBoolean: boolean compareAndSet(boolean,boolean)>(0, 1);
if v == 0 goto label;
staticinvoke <org.apache.dubbo.common.timer.HashedWheelTimer: void reportTooManyInstances()>();
label:
return;
}
protected void finalize() throws java.lang.Throwable
{
java.lang.Throwable v;
java.util.concurrent.atomic.AtomicIntegerFieldUpdater v, v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
java.util.concurrent.atomic.AtomicInteger v, v;
int v, v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
label:
specialinvoke v.<java.lang.Object: void finalize()>();
label:
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicIntegerFieldUpdater: int getAndSet(java.lang.Object,int)>(v, 2);
if v == 2 goto label;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNTER>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int decrementAndGet()>();
goto label;
label:
v := @caughtexception;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicIntegerFieldUpdater: int getAndSet(java.lang.Object,int)>(v, 2);
if v == 2 goto label;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNTER>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int decrementAndGet()>();
label:
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
}
private static org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] createWheel(int)
{
org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket[] v;
java.lang.IllegalArgumentException v, v;
org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket v;
int v, v, v, v;
java.lang.String v, v;
v := @parameter: int;
if v > 0 goto label;
v = new java.lang.IllegalArgumentException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("ticksPerWheel must be greater than 0: \u0001");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
if v <= 1073741824 goto label;
v = new java.lang.IllegalArgumentException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("ticksPerWheel may not be greater than 2^30: \u0001");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
v = staticinvoke <org.apache.dubbo.common.timer.HashedWheelTimer: int normalizeTicksPerWheel(int)>(v);
v = newarray (org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket)[v];
v = 0;
label:
v = lengthof v;
if v >= v goto label;
v = new org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket;
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket: void <init>()>();
v[v] = v;
v = v + 1;
goto label;
label:
return v;
}
private static int normalizeTicksPerWheel(int)
{
int v, v, v, v, v, v, v, v, v, v, v, v, v;
v := @parameter: int;
v = v - 1;
v = v >>> 1;
v = v | v;
v = v >>> 2;
v = v | v;
v = v >>> 4;
v = v | v;
v = v >>> 8;
v = v | v;
v = v >>> 16;
v = v | v;
v = v + 1;
return v;
}
public void start()
{
java.lang.IllegalStateException v;
java.util.concurrent.atomic.AtomicIntegerFieldUpdater v, v;
java.lang.Error v;
long v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
java.util.concurrent.CountDownLatch v;
byte v;
java.lang.InterruptedException v;
java.lang.Thread v;
int v;
boolean v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicIntegerFieldUpdater: int get(java.lang.Object)>(v);
tableswitch(v)
{
case 0: goto label;
case 1: goto label;
case 2: goto label;
default: goto label;
};
label:
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicIntegerFieldUpdater: boolean compareAndSet(java.lang.Object,int,int)>(v, 0, 1);
if v == 0 goto label;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.lang.Thread workerThread>;
virtualinvoke v.<java.lang.Thread: void start()>();
goto label;
label:
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("cannot be started once stopped");
throw v;
label:
v = new java.lang.Error;
specialinvoke v.<java.lang.Error: void <init>(java.lang.String)>("Invalid WorkerState");
throw v;
label:
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: long startTime>;
v = v cmp 0L;
if v != 0 goto label;
label:
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.CountDownLatch startTimeInitialized>;
virtualinvoke v.<java.util.concurrent.CountDownLatch: void await()>();
label:
goto label;
label:
v := @caughtexception;
goto label;
label:
return;
catch java.lang.InterruptedException from label to label with label;
}
public java.util.Set stop()
{
java.lang.Throwable v;
java.lang.IllegalStateException v;
java.util.concurrent.atomic.AtomicIntegerFieldUpdater v, v;
java.util.concurrent.atomic.AtomicInteger v, v, v;
java.lang.Thread v, v, v, v, v, v;
int v;
java.lang.String v, v, v;
org.apache.dubbo.common.timer.HashedWheelTimer$Worker v;
boolean v, v, v;
java.util.Set v, v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
java.lang.InterruptedException v;
java.lang.Class v, v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v = staticinvoke <java.lang.Thread: java.lang.Thread currentThread()>();
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.lang.Thread workerThread>;
if v != v goto label;
v = new java.lang.IllegalStateException;
v = class "Lorg/apache/dubbo/common/timer/HashedWheelTimer;";
v = virtualinvoke v.<java.lang.Class: java.lang.String getSimpleName()>();
v = class "Lorg/apache/dubbo/common/timer/TimerTask;";
v = virtualinvoke v.<java.lang.Class: java.lang.String getSimpleName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u.stop() cannot be called from \u0001");
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>(v);
throw v;
label:
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicIntegerFieldUpdater: boolean compareAndSet(java.lang.Object,int,int)>(v, 1, 2);
if v != 0 goto label;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicIntegerFieldUpdater: int getAndSet(java.lang.Object,int)>(v, 2);
if v == 2 goto label;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNTER>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int decrementAndGet()>();
label:
v = staticinvoke <java.util.Collections: java.util.Set emptySet()>();
return v;
label:
v = 0;
label:
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.lang.Thread workerThread>;
v = virtualinvoke v.<java.lang.Thread: boolean isAlive()>();
if v == 0 goto label;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.lang.Thread workerThread>;
virtualinvoke v.<java.lang.Thread: void interrupt()>();
label:
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.lang.Thread workerThread>;
virtualinvoke v.<java.lang.Thread: void join(long)>(100L);
label:
goto label;
label:
v := @caughtexception;
v = 1;
goto label;
label:
if v == 0 goto label;
v = staticinvoke <java.lang.Thread: java.lang.Thread currentThread()>();
virtualinvoke v.<java.lang.Thread: void interrupt()>();
label:
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNTER>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int decrementAndGet()>();
goto label;
label:
v := @caughtexception;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNTER>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int decrementAndGet()>();
throw v;
label:
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.timer.HashedWheelTimer$Worker worker>;
v = virtualinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer$Worker: java.util.Set unprocessedTimeouts()>();
return v;
catch java.lang.InterruptedException from label to label with label;
catch java.lang.Throwable from label to label with label;
}
public boolean isStop()
{
java.util.concurrent.atomic.AtomicIntegerFieldUpdater v;
int v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
boolean v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicIntegerFieldUpdater: int get(java.lang.Object)>(v);
if 2 != v goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public org.apache.dubbo.common.timer.Timeout newTimeout(org.apache.dubbo.common.timer.TimerTask, long, java.util.concurrent.TimeUnit)
{
long v, v, v, v, v, v, v, v, v, v;
org.apache.dubbo.common.timer.TimerTask v;
java.lang.NullPointerException v, v;
org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout v;
java.util.concurrent.RejectedExecutionException v;
byte v, v, v, v;
java.lang.String v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
java.util.concurrent.TimeUnit v;
java.util.concurrent.atomic.AtomicLong v, v;
java.util.Queue v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v := @parameter: org.apache.dubbo.common.timer.TimerTask;
v := @parameter: long;
v := @parameter: java.util.concurrent.TimeUnit;
if v != null goto label;
v = new java.lang.NullPointerException;
specialinvoke v.<java.lang.NullPointerException: void <init>(java.lang.String)>("task");
throw v;
label:
if v != null goto label;
v = new java.lang.NullPointerException;
specialinvoke v.<java.lang.NullPointerException: void <init>(java.lang.String)>("unit");
throw v;
label:
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicLong pendingTimeouts>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: long incrementAndGet()>();
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: long maxPendingTimeouts>;
v = v cmp 0L;
if v <= 0 goto label;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: long maxPendingTimeouts>;
v = v cmp v;
if v <= 0 goto label;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicLong pendingTimeouts>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: long decrementAndGet()>();
v = new java.util.concurrent.RejectedExecutionException;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: long maxPendingTimeouts>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (long,long)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Number of pending timeouts (\u) is greater than or equal to maximum allowed pending timeouts (\u)");
specialinvoke v.<java.util.concurrent.RejectedExecutionException: void <init>(java.lang.String)>(v);
throw v;
label:
virtualinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer: void start()>();
v = staticinvoke <java.lang.System: long nanoTime()>();
v = virtualinvoke v.<java.util.concurrent.TimeUnit: long toNanos(long)>(v);
v = v + v;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: long startTime>;
v = v - v;
v = v cmp 0L;
if v <= 0 goto label;
v = v cmp 0L;
if v >= 0 goto label;
v = 9223372036854775807L;
label:
v = new org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout;
specialinvoke v.<org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout: void <init>(org.apache.dubbo.common.timer.HashedWheelTimer,org.apache.dubbo.common.timer.TimerTask,long)>(v, v, v);
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.Queue timeouts>;
interfaceinvoke v.<java.util.Queue: boolean add(java.lang.Object)>(v);
return v;
}
public long pendingTimeouts()
{
java.util.concurrent.atomic.AtomicLong v;
long v;
org.apache.dubbo.common.timer.HashedWheelTimer v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v = v.<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicLong pendingTimeouts>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: long get()>();
return v;
}
private static void reportTooManyInstances()
{
java.lang.String v, v;
org.apache.dubbo.common.logger.Logger v;
v = staticinvoke <org.apache.dubbo.common.utils.ClassUtils: java.lang.String simpleClassName(java.lang.Class)>(class "Lorg/apache/dubbo/common/timer/HashedWheelTimer;");
v = <org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.logger.Logger logger>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("You are creating too many \u instances. \u is a shared resource that must be reused across the JVM,so that only a few instances are created.");
interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: void error(java.lang.String)>(v);
return;
}
private boolean isWindows()
{
org.apache.dubbo.common.timer.HashedWheelTimer v;
boolean v;
v := @this: org.apache.dubbo.common.timer.HashedWheelTimer;
v = <org.apache.dubbo.common.timer.HashedWheelTimer: boolean IS_OS_WINDOWS>;
return v;
}
static void <clinit>()
{
java.util.concurrent.atomic.AtomicIntegerFieldUpdater v;
org.apache.dubbo.common.logger.Logger v;
java.util.concurrent.atomic.AtomicBoolean v;
java.util.concurrent.atomic.AtomicInteger v;
java.util.Locale v;
java.lang.String v, v;
boolean v;
v = staticinvoke <org.apache.dubbo.common.logger.LoggerFactory: org.apache.dubbo.common.logger.Logger getLogger(java.lang.Class)>(class "Lorg/apache/dubbo/common/timer/HashedWheelTimer;");
<org.apache.dubbo.common.timer.HashedWheelTimer: org.apache.dubbo.common.logger.Logger logger> = v;
v = new java.util.concurrent.atomic.AtomicInteger;
specialinvoke v.<java.util.concurrent.atomic.AtomicInteger: void <init>()>();
<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNTER> = v;
v = new java.util.concurrent.atomic.AtomicBoolean;
specialinvoke v.<java.util.concurrent.atomic.AtomicBoolean: void <init>()>();
<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicBoolean WARNED_TOO_MANY_INSTANCES> = v;
v = staticinvoke <java.util.concurrent.atomic.AtomicIntegerFieldUpdater: java.util.concurrent.atomic.AtomicIntegerFieldUpdater newUpdater(java.lang.Class,java.lang.String)>(class "Lorg/apache/dubbo/common/timer/HashedWheelTimer;", "workerState");
<org.apache.dubbo.common.timer.HashedWheelTimer: java.util.concurrent.atomic.AtomicIntegerFieldUpdater WORKER_STATE_UPDATER> = v;
v = staticinvoke <java.lang.System: java.lang.String getProperty(java.lang.String,java.lang.String)>("os.name", "");
v = <java.util.Locale: java.util.Locale US>;
v = virtualinvoke v.<java.lang.String: java.lang.String toLowerCase(java.util.Locale)>(v);
v = virtualinvoke v.<java.lang.String: boolean contains(java.lang.CharSequence)>("win");
<org.apache.dubbo.common.timer.HashedWheelTimer: boolean IS_OS_WINDOWS> = v;
return;
}
}