public interface FixedThreadsExecutorGroup extends Iterable<SingleThreadExecutor>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
execute(int index,
Runnable task)
Executes the given task at some time in the future.
|
SingleThreadExecutor |
next()
Returns one of the
SingleThreadExecutors managed by this
FixedThreadsExecutorGroup. |
boolean |
shutdownGracefully()
Shortcut method for
shutdownGracefully(long, TimeUnit) with
sensible default values. |
boolean |
shutdownGracefully(long timeout,
TimeUnit unit)
Signals all executors that the caller wants them to be shutdown.
|
forEach, iterator, spliteratorSingleThreadExecutor next()
SingleThreadExecutors managed by this
FixedThreadsExecutorGroup.void execute(int index,
Runnable task)
index - index for thread choosertask - the runnable taskboolean shutdownGracefully()
shutdownGracefully(long, TimeUnit) with
sensible default values.boolean shutdownGracefully(long timeout,
TimeUnit unit)
timeout - the maximum amount of time to wait until the executor
is shutdownunit - the unit of timeoutCopyright © 2021. All rights reserved.