| Modifier and Type | Field and Description |
|---|---|
static int |
CACHED_POOL |
protected java.lang.ThreadLocal<java.lang.Boolean> |
isMainThread |
| Constructor and Description |
|---|
SchedulerExecutorPoolImpl(java.lang.String name) |
SchedulerExecutorPoolImpl(java.lang.String name,
int pool) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.concurrent.ExecutorService |
createAsyncExecutor(java.lang.String name,
int pool)
Create async executor.
|
protected java.util.concurrent.ExecutorService |
createMainExecutor(java.lang.String name)
Create the main executor.
|
void |
shutdown() |
<T> java.util.concurrent.CompletableFuture<T> |
supplyLater(SchedulerPoll type,
java.time.Duration delay,
ThrowingSupplier<T,java.lang.Throwable> supplier)
Runs the supplier in the specified thread
after the specified delay
|
public static final int CACHED_POOL
protected final java.lang.ThreadLocal<java.lang.Boolean> isMainThread
public SchedulerExecutorPoolImpl(java.lang.String name)
public SchedulerExecutorPoolImpl(java.lang.String name,
int pool)
public <T> java.util.concurrent.CompletableFuture<T> supplyLater(SchedulerPoll type, java.time.Duration delay, ThrowingSupplier<T,java.lang.Throwable> supplier)
SchedulersupplyLater in interface SchedulerT - the supplier return typetype - the thread typedelay - the delaysupplier - the supplier to runprotected java.util.concurrent.ExecutorService createMainExecutor(java.lang.String name)
isMainThread to true.protected java.util.concurrent.ExecutorService createAsyncExecutor(java.lang.String name,
int pool)