public final class DefaultFixedThreadsExecutorGroup extends Object implements FixedThreadsExecutorGroup
| Constructor and Description |
|---|
DefaultFixedThreadsExecutorGroup(ExecutorService[] executors) |
DefaultFixedThreadsExecutorGroup(ExecutorService[] executors,
ExecutorChooserFactory.ExecutorChooser chooser) |
DefaultFixedThreadsExecutorGroup(SingleThreadExecutor[] children) |
DefaultFixedThreadsExecutorGroup(SingleThreadExecutor[] children,
ExecutorChooserFactory.ExecutorChooser chooser) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(int index,
Runnable task)
Executes the given task at some time in the future.
|
Iterator<SingleThreadExecutor> |
iterator() |
SingleThreadExecutor |
next()
Returns one of the
SingleThreadExecutors managed by this
FixedThreadsExecutorGroup. |
boolean |
shutdownGracefully()
Shortcut method for
FixedThreadsExecutorGroup.shutdownGracefully(long, TimeUnit) with
sensible default values. |
boolean |
shutdownGracefully(long timeout,
TimeUnit unit)
Signals all executors that the caller wants them to be shutdown.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultFixedThreadsExecutorGroup(SingleThreadExecutor[] children)
public DefaultFixedThreadsExecutorGroup(SingleThreadExecutor[] children, ExecutorChooserFactory.ExecutorChooser chooser)
public DefaultFixedThreadsExecutorGroup(ExecutorService[] executors)
public DefaultFixedThreadsExecutorGroup(ExecutorService[] executors, ExecutorChooserFactory.ExecutorChooser chooser)
public SingleThreadExecutor next()
FixedThreadsExecutorGroupSingleThreadExecutors managed by this
FixedThreadsExecutorGroup.next in interface FixedThreadsExecutorGrouppublic void execute(int index,
Runnable task)
FixedThreadsExecutorGroupexecute in interface FixedThreadsExecutorGroupindex - index for thread choosertask - the runnable taskpublic boolean shutdownGracefully()
FixedThreadsExecutorGroupFixedThreadsExecutorGroup.shutdownGracefully(long, TimeUnit) with
sensible default values.shutdownGracefully in interface FixedThreadsExecutorGrouppublic boolean shutdownGracefully(long timeout,
TimeUnit unit)
FixedThreadsExecutorGroupshutdownGracefully in interface FixedThreadsExecutorGrouptimeout - the maximum amount of time to wait until the executor
is shutdownunit - the unit of timeoutpublic Iterator<SingleThreadExecutor> iterator()
iterator in interface Iterable<SingleThreadExecutor>Copyright © 2024. All rights reserved.