Package com.yahoo.concurrent
Class CachedThreadPoolWithFallback
- java.lang.Object
-
- com.yahoo.concurrent.CachedThreadPoolWithFallback
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.concurrent.Executor
public class CachedThreadPoolWithFallback extends java.lang.Object implements java.lang.AutoCloseable, java.util.concurrent.Executor
An executor that will first try a bounded cached threadpool before falling back to a unbounded single threaded threadpool that will take over dispatching to the primary pool.
-
-
Constructor Summary
Constructors Constructor Description CachedThreadPoolWithFallback(java.lang.String baseName, int corePoolSize, int maximumPoolSize, long keepAlimeTime, java.util.concurrent.TimeUnit timeUnit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
execute(java.lang.Runnable command)
-