Class IoScheduler.CachedWorkerPool
- java.lang.Object
-
- io.reactivex.rxjava3.internal.schedulers.IoScheduler.CachedWorkerPool
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- IoScheduler
static final class IoScheduler.CachedWorkerPool extends java.lang.Object implements java.lang.Runnable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CompositeDisposable
allWorkers
private java.util.concurrent.ScheduledExecutorService
evictorService
private java.util.concurrent.Future<?>
evictorTask
private java.util.concurrent.ConcurrentLinkedQueue<IoScheduler.ThreadWorker>
expiringWorkerQueue
private long
keepAliveTime
private java.util.concurrent.ThreadFactory
threadFactory
-
Constructor Summary
Constructors Constructor Description CachedWorkerPool(long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.ThreadFactory threadFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static void
evictExpiredWorkers(java.util.concurrent.ConcurrentLinkedQueue<IoScheduler.ThreadWorker> expiringWorkerQueue, CompositeDisposable allWorkers)
(package private) IoScheduler.ThreadWorker
get()
(package private) static long
now()
(package private) void
release(IoScheduler.ThreadWorker threadWorker)
void
run()
(package private) void
shutdown()
-
-
-
Field Detail
-
keepAliveTime
private final long keepAliveTime
-
expiringWorkerQueue
private final java.util.concurrent.ConcurrentLinkedQueue<IoScheduler.ThreadWorker> expiringWorkerQueue
-
allWorkers
final CompositeDisposable allWorkers
-
evictorService
private final java.util.concurrent.ScheduledExecutorService evictorService
-
evictorTask
private final java.util.concurrent.Future<?> evictorTask
-
threadFactory
private final java.util.concurrent.ThreadFactory threadFactory
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
get
IoScheduler.ThreadWorker get()
-
release
void release(IoScheduler.ThreadWorker threadWorker)
-
evictExpiredWorkers
static void evictExpiredWorkers(java.util.concurrent.ConcurrentLinkedQueue<IoScheduler.ThreadWorker> expiringWorkerQueue, CompositeDisposable allWorkers)
-
now
static long now()
-
shutdown
void shutdown()
-
-