final class io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool implements java.lang.Runnable
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool
super_class: java.lang.Object
{
private final long keepAliveTime;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.ConcurrentLinkedQueue<io.reactivex.internal.schedulers.IoScheduler$ThreadWorker> expiringWorkerQueue;
descriptor: Ljava/util/concurrent/ConcurrentLinkedQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentLinkedQueue<Lio/reactivex/internal/schedulers/IoScheduler$ThreadWorker;>;
final io.reactivex.disposables.CompositeDisposable allWorkers;
descriptor: Lio/reactivex/disposables/CompositeDisposable;
flags: (0x0010) ACC_FINAL
private final java.util.concurrent.ScheduledExecutorService evictorService;
descriptor: Ljava/util/concurrent/ScheduledExecutorService;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.Future<?> evictorTask;
descriptor: Ljava/util/concurrent/Future;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/Future<*>;
private final java.util.concurrent.ThreadFactory threadFactory;
descriptor: Ljava/util/concurrent/ThreadFactory;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void <init>(long, java.util.concurrent.TimeUnit, java.util.concurrent.ThreadFactory);
descriptor: (JLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/ThreadFactory;)V
flags: (0x0000)
Code:
stack=7, locals=7, args_size=4
start local 0 start local 1 start local 3 start local 4 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 3
ifnull 2
aload 3
lload 1
invokevirtual java.util.concurrent.TimeUnit.toNanos:(J)J
goto 3
StackMap locals: io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool long java.util.concurrent.TimeUnit java.util.concurrent.ThreadFactory
StackMap stack: io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool
2: lconst_0
StackMap locals: io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool long java.util.concurrent.TimeUnit java.util.concurrent.ThreadFactory
StackMap stack: io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool long
3: putfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.keepAliveTime:J
4: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.expiringWorkerQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
5: aload 0
new io.reactivex.disposables.CompositeDisposable
dup
invokespecial io.reactivex.disposables.CompositeDisposable.<init>:()V
putfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.allWorkers:Lio/reactivex/disposables/CompositeDisposable;
6: aload 0
aload 4
putfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.threadFactory:Ljava/util/concurrent/ThreadFactory;
7: aconst_null
astore 5
start local 5 8: aconst_null
astore 6
start local 6 9: aload 3
ifnull 12
10: iconst_1
getstatic io.reactivex.internal.schedulers.IoScheduler.EVICTOR_THREAD_FACTORY:Lio/reactivex/internal/schedulers/RxThreadFactory;
invokestatic java.util.concurrent.Executors.newScheduledThreadPool:(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;
astore 5
11: aload 5
aload 0
aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.keepAliveTime:J
aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.keepAliveTime:J
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokeinterface java.util.concurrent.ScheduledExecutorService.scheduleWithFixedDelay:(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
astore 6
12: StackMap locals: java.util.concurrent.ScheduledExecutorService java.util.concurrent.Future
StackMap stack:
aload 0
aload 5
putfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.evictorService:Ljava/util/concurrent/ScheduledExecutorService;
13: aload 0
aload 6
putfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.evictorTask:Ljava/util/concurrent/Future;
14: return
end local 6 end local 5 end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lio/reactivex/internal/schedulers/IoScheduler$CachedWorkerPool;
0 15 1 keepAliveTime J
0 15 3 unit Ljava/util/concurrent/TimeUnit;
0 15 4 threadFactory Ljava/util/concurrent/ThreadFactory;
8 15 5 evictor Ljava/util/concurrent/ScheduledExecutorService;
9 15 6 task Ljava/util/concurrent/Future<*>;
MethodParameters:
Name Flags
keepAliveTime
unit
threadFactory
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.evictExpiredWorkers:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/reactivex/internal/schedulers/IoScheduler$CachedWorkerPool;
io.reactivex.internal.schedulers.IoScheduler$ThreadWorker get();
descriptor: ()Lio/reactivex/internal/schedulers/IoScheduler$ThreadWorker;
flags: (0x0000)
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.allWorkers:Lio/reactivex/disposables/CompositeDisposable;
invokevirtual io.reactivex.disposables.CompositeDisposable.isDisposed:()Z
ifeq 5
1: getstatic io.reactivex.internal.schedulers.IoScheduler.SHUTDOWN_THREAD_WORKER:Lio/reactivex/internal/schedulers/IoScheduler$ThreadWorker;
areturn
2: StackMap locals:
StackMap stack:
aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.expiringWorkerQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.poll:()Ljava/lang/Object;
checkcast io.reactivex.internal.schedulers.IoScheduler$ThreadWorker
astore 1
start local 1 3: aload 1
ifnull 5
4: aload 1
areturn
end local 1 5: StackMap locals:
StackMap stack:
aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.expiringWorkerQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.isEmpty:()Z
ifeq 2
6: new io.reactivex.internal.schedulers.IoScheduler$ThreadWorker
dup
aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.threadFactory:Ljava/util/concurrent/ThreadFactory;
invokespecial io.reactivex.internal.schedulers.IoScheduler$ThreadWorker.<init>:(Ljava/util/concurrent/ThreadFactory;)V
astore 1
start local 1 7: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.allWorkers:Lio/reactivex/disposables/CompositeDisposable;
aload 1
invokevirtual io.reactivex.disposables.CompositeDisposable.add:(Lio/reactivex/disposables/Disposable;)Z
pop
8: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lio/reactivex/internal/schedulers/IoScheduler$CachedWorkerPool;
3 5 1 threadWorker Lio/reactivex/internal/schedulers/IoScheduler$ThreadWorker;
7 9 1 w Lio/reactivex/internal/schedulers/IoScheduler$ThreadWorker;
void release(io.reactivex.internal.schedulers.IoScheduler$ThreadWorker);
descriptor: (Lio/reactivex/internal/schedulers/IoScheduler$ThreadWorker;)V
flags: (0x0000)
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokevirtual io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.now:()J
aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.keepAliveTime:J
ladd
invokevirtual io.reactivex.internal.schedulers.IoScheduler$ThreadWorker.setExpirationTime:(J)V
1: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.expiringWorkerQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 1
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.offer:(Ljava/lang/Object;)Z
pop
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/reactivex/internal/schedulers/IoScheduler$CachedWorkerPool;
0 3 1 threadWorker Lio/reactivex/internal/schedulers/IoScheduler$ThreadWorker;
MethodParameters:
Name Flags
threadWorker
void evictExpiredWorkers();
descriptor: ()V
flags: (0x0000)
Code:
stack=4, locals=5, args_size=1
start local 0 0: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.expiringWorkerQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.isEmpty:()Z
ifne 8
1: aload 0
invokevirtual io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.now:()J
lstore 1
start local 1 2: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.expiringWorkerQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.iterator:()Ljava/util/Iterator;
astore 4
goto 7
StackMap locals: io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool long top java.util.Iterator
StackMap stack:
3: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.reactivex.internal.schedulers.IoScheduler$ThreadWorker
astore 3
start local 3 4: aload 3
invokevirtual io.reactivex.internal.schedulers.IoScheduler$ThreadWorker.getExpirationTime:()J
lload 1
lcmp
ifgt 8
5: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.expiringWorkerQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 3
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.remove:(Ljava/lang/Object;)Z
ifeq 7
6: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.allWorkers:Lio/reactivex/disposables/CompositeDisposable;
aload 3
invokevirtual io.reactivex.disposables.CompositeDisposable.remove:(Lio/reactivex/disposables/Disposable;)Z
pop
end local 3 7: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
end local 1 8: StackMap locals: io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lio/reactivex/internal/schedulers/IoScheduler$CachedWorkerPool;
2 8 1 currentTimestamp J
4 7 3 threadWorker Lio/reactivex/internal/schedulers/IoScheduler$ThreadWorker;
long now();
descriptor: ()J
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: invokestatic java.lang.System.nanoTime:()J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/reactivex/internal/schedulers/IoScheduler$CachedWorkerPool;
void shutdown();
descriptor: ()V
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.allWorkers:Lio/reactivex/disposables/CompositeDisposable;
invokevirtual io.reactivex.disposables.CompositeDisposable.dispose:()V
1: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.evictorTask:Ljava/util/concurrent/Future;
ifnull 3
2: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.evictorTask:Ljava/util/concurrent/Future;
iconst_1
invokeinterface java.util.concurrent.Future.cancel:(Z)Z
pop
3: StackMap locals:
StackMap stack:
aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.evictorService:Ljava/util/concurrent/ScheduledExecutorService;
ifnull 5
4: aload 0
getfield io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool.evictorService:Ljava/util/concurrent/ScheduledExecutorService;
invokeinterface java.util.concurrent.ScheduledExecutorService.shutdownNow:()Ljava/util/List;
pop
5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lio/reactivex/internal/schedulers/IoScheduler$CachedWorkerPool;
}
SourceFile: "IoScheduler.java"
NestHost: io.reactivex.internal.schedulers.IoScheduler
InnerClasses:
final CachedWorkerPool = io.reactivex.internal.schedulers.IoScheduler$CachedWorkerPool of io.reactivex.internal.schedulers.IoScheduler
final ThreadWorker = io.reactivex.internal.schedulers.IoScheduler$ThreadWorker of io.reactivex.internal.schedulers.IoScheduler