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) CompositeDisposableallWorkersprivate java.util.concurrent.ScheduledExecutorServiceevictorServiceprivate java.util.concurrent.Future<?>evictorTaskprivate java.util.concurrent.ConcurrentLinkedQueue<IoScheduler.ThreadWorker>expiringWorkerQueueprivate longkeepAliveTimeprivate java.util.concurrent.ThreadFactorythreadFactory
-
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 voidevictExpiredWorkers(java.util.concurrent.ConcurrentLinkedQueue<IoScheduler.ThreadWorker> expiringWorkerQueue, CompositeDisposable allWorkers)(package private) IoScheduler.ThreadWorkerget()(package private) static longnow()(package private) voidrelease(IoScheduler.ThreadWorker threadWorker)voidrun()(package private) voidshutdown()
-
-
-
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:
runin 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()
-
-