org.eclipse.jetty.util.thread.ThreadPool.SizedThreadPool wrapper around ThreadPoolExecutor.
| Modifier and Type | Field and Description |
|---|---|
| private final ThreadPoolBudget | |
| private boolean | |
| private boolean | |
| private final ThreadPoolExecutor | |
| private final ThreadGroup | |
| private int | |
| private String | |
| private int | |
| private int | |
| private TryExecutor | |
| private Executor |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| private | ExecutorThreadPool(ThreadPoolExecutor executor, int minThreads, int reservedThreads, ThreadGroup group)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | doStart()
Overrides org. Starts the managed lifecycle beans in the order they were added. |
| protected void | doStop()
Overrides org. Stops the managed lifecycle beans in the reverse order they were added. |
| public void | dump(Appendable
The appendable to dump to out, String The indent to apply after any new lines. indent)Overrides org. Implements org. Dump this object (and children) into an Appendable using the provided indent after any new lines. |
| public void | execute(Runnable
the runnable task command)Overrides default org. Implements java. Executes the given command at some time in the future. |
| public int | |
| public int | |
| public int | |
| public int | |
| public String | |
| public int | getReservedThreads()
Returns: number of reserved threads or -1 to indicate that the number is heuristically determined |
| public ThreadPoolBudget | |
| public int | |
| public int | |
| public Executor | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | join()
Implements org. Blocks until the thread pool is |
| protected Thread | |
| public void | |
| public void | |
| public void | setIdleTimeout(int
the maximum thread idle time in ms. idleTimeout)Sets the maximum thread idle time in ms. |
| public void | setMaxThreads(int
the maximum number of threads threads)Implements org.
|
| public void | setMinThreads(int
the minimum number of threads threads)Implements org.
|
| public void | |
| public void | setReservedThreads(int
number of reserved threads or -1 to determine the number heuristically reservedThreads)Sets the number of reserved threads. |
| public void | |
| public void | setVirtualThreadsExecutor(Executor
the executor)Executor to use to execute tasks in virtual threadsOverrides default org.
|
| public String | toString()
Overrides org. Returns a string representation of the object. |
| public boolean | tryExecute(Runnable
The task to be executed task)Implements org. Attempt to execute a task. |
| _budget | back to summary |
|---|---|
| private final ThreadPoolBudget _budget | |
| _daemon | back to summary |
|---|---|
| private boolean _daemon | |
| _detailedDump | back to summary |
|---|---|
| private boolean _detailedDump | |
| _executor | back to summary |
|---|---|
| private final ThreadPoolExecutor _executor | |
| _group | back to summary |
|---|---|
| private final ThreadGroup _group | |
| _minThreads | back to summary |
|---|---|
| private int _minThreads | |
| _name | back to summary |
|---|---|
| private String _name | |
| _priority | back to summary |
|---|---|
| private int _priority | |
| _reservedThreads | back to summary |
|---|---|
| private int _reservedThreads | |
| _tryExecutor | back to summary |
|---|---|
| private TryExecutor _tryExecutor | |
| _virtualThreadsExecutor | back to summary |
|---|---|
| private Executor _virtualThreadsExecutor | |
| ExecutorThreadPool | back to summary |
|---|---|
| public ExecutorThreadPool() | |
| ExecutorThreadPool | back to summary |
|---|---|
| public ExecutorThreadPool(int maxThreads) | |
| ExecutorThreadPool | back to summary |
|---|---|
| public ExecutorThreadPool(int maxThreads, int minThreads) | |
| ExecutorThreadPool | back to summary |
|---|---|
| public ExecutorThreadPool(int maxThreads, int minThreads, BlockingQueue<Runnable> queue) | |
| ExecutorThreadPool | back to summary |
|---|---|
| public ExecutorThreadPool(ThreadPoolExecutor executor) | |
| ExecutorThreadPool | back to summary |
|---|---|
| public ExecutorThreadPool(ThreadPoolExecutor executor, int reservedThreads) | |
| ExecutorThreadPool | back to summary |
|---|---|
| public ExecutorThreadPool(ThreadPoolExecutor executor, int reservedThreads, ThreadGroup group) | |
| ExecutorThreadPool | back to summary |
|---|---|
| private ExecutorThreadPool(ThreadPoolExecutor executor, int minThreads, int reservedThreads, ThreadGroup group) | |
| doStart | back to summary |
|---|---|
| protected void doStart() throws Exception Overrides org. Doc from org. Starts the managed lifecycle beans in the order they were added.
| |
| doStop | back to summary |
|---|---|
| protected void doStop() throws Exception Overrides org. Doc from org. Stops the managed lifecycle beans in the reverse order they were added.
| |
| dump | back to summary |
|---|---|
| public void dump(Appendable out, String indent) throws IOException Overrides org. Implements org. Doc from org. Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
| |
| execute | back to summary |
|---|---|
| public void execute(Runnable command) Overrides default org. Implements java. Doc from java. Executes the given command at some time in the future. The command
may execute in a new thread, in a pooled thread, or in the calling
thread, at the discretion of the | |
| getIdleThreads | back to summary |
|---|---|
| public int getIdleThreads() Implements org.
| |
| getIdleTimeout | back to summary |
|---|---|
public int getIdleTimeout()
| |
| getMaxThreads | back to summary |
|---|---|
| public int getMaxThreads() Implements org.
| |
| getMinThreads | back to summary |
|---|---|
| public int getMinThreads() Implements org.
| |
| getName | back to summary |
|---|---|
public String getName()
| |
| getReservedThreads | back to summary |
|---|---|
public int getReservedThreads()
| |
| getThreadPoolBudget | back to summary |
|---|---|
| public ThreadPoolBudget getThreadPoolBudget() Overrides default org.
| |
| getThreads | back to summary |
|---|---|
| public int getThreads() Implements org.
| |
| getThreadsPriority | back to summary |
|---|---|
| public int getThreadsPriority() | |
| getVirtualThreadsExecutor | back to summary |
|---|---|
| public Executor getVirtualThreadsExecutor() Overrides default org.
| |
| isDaemon | back to summary |
|---|---|
public boolean isDaemon()
| |
| isDetailedDump | back to summary |
|---|---|
public boolean isDetailedDump()
| |
| isLowOnThreads | back to summary |
|---|---|
| public boolean isLowOnThreads() Implements org.
| |
| join | back to summary |
|---|---|
| public void join() throws InterruptedException Implements org. Doc from org. Blocks until the thread pool is
| |
| newThread | back to summary |
|---|---|
| protected Thread newThread(Runnable job) | |
| setDaemon | back to summary |
|---|---|
public void setDaemon(boolean daemon)
| |
| setDetailedDump | back to summary |
|---|---|
| public void setDetailedDump(boolean detailedDump) | |
| setIdleTimeout | back to summary |
|---|---|
| public void setIdleTimeout(int idleTimeout) Sets the maximum thread idle time in ms. Threads that are idle for longer than this period may be stopped.
| |
| setMaxThreads | back to summary |
|---|---|
| public void setMaxThreads(int threads) Implements org.
| |
| setMinThreads | back to summary |
|---|---|
| public void setMinThreads(int threads) Implements org.
| |
| setName | back to summary |
|---|---|
| public void setName(String name) Set the name of this thread pool, used to name threads.
| |
| setReservedThreads | back to summary |
|---|---|
| public void setReservedThreads(int reservedThreads) Sets the number of reserved threads.
| |
| setThreadsPriority | back to summary |
|---|---|
| public void setThreadsPriority(int priority) | |
| setVirtualThreadsExecutor | back to summary |
|---|---|
| public void setVirtualThreadsExecutor(Executor executor) Overrides default org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| tryExecute | back to summary |
|---|---|
| public boolean tryExecute(Runnable task) Implements org. Doc from org. Attempt to execute a task. | |