java.util.concurrent.Executor, java.util.concurrent.ExecutorService@Private public final class BlockingThreadPoolExecutorService extends SemaphoredDelegatingExecutor
This is inspired by this s4 threadpool
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.concurrent.ThreadFactory |
newDaemonThreadFactory(java.lang.String prefix) |
Get a named
ThreadFactory that just builds daemon threads. |
static BlockingThreadPoolExecutorService |
newInstance(int activeTasks,
int waitingTasks,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.lang.String prefixName) |
A thread pool that that blocks clients submitting additional tasks if
there are already
activeTasks running threads and
waitingTasks tasks waiting in its queue. |
java.lang.String |
toString() |
delegate, execute, getAvailablePermits, getPermitCount, getWaitingCount, invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submitpublic static java.util.concurrent.ThreadFactory newDaemonThreadFactory(java.lang.String prefix)
ThreadFactory that just builds daemon threads.prefix - name prefix for all threads created from the factorypublic static BlockingThreadPoolExecutorService newInstance(int activeTasks, int waitingTasks, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.lang.String prefixName)
activeTasks running threads and
waitingTasks tasks waiting in its queue.activeTasks - maximum number of active taskswaitingTasks - maximum number of waiting taskskeepAliveTime - time until threads are cleaned up in unitunit - time unitprefixName - prefix of name for threadspublic java.lang.String toString()
toString in class SemaphoredDelegatingExecutorCopyright © 2008–2025 Apache Software Foundation. All rights reserved.