A budget of required thread usage, used to warn or error for insufficient configured threads.
ThreadPool.SizedThreadPool#getThreadPoolBudget()
| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| public class | ThreadPoolBudget.Leased
An allocation of threads |
| Modifier and Type | Field and Description |
|---|---|
| private final Set | |
| private static final Logger | |
| private static final ThreadPoolBudget. | |
| private final ThreadPool. | |
| private final int | |
| private final AtomicBoolean |
| Access | Constructor and Description |
|---|---|
| public | ThreadPoolBudget(ThreadPool.
The pool to budget thread allocation for. poolConstruct a budget for a SizedThreadPool. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if passes check, false if otherwise (see logs for details)A proposed change to the maximum threads to check. maxThreads)Checks leases against the given number of |
| public int | |
| public ThreadPool. | |
| public static ThreadPoolBudget. | |
| public ThreadPoolBudget. | |
| private void | |
| public void |
| leases | back to summary |
|---|---|
| private final Set<ThreadPoolBudget. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| NOOP_LEASE | back to summary |
|---|---|
| private static final ThreadPoolBudget. | |
| pool | back to summary |
|---|---|
| private final ThreadPool. | |
| warnAt | back to summary |
|---|---|
| private final int warnAt | |
| warned | back to summary |
|---|---|
| private final AtomicBoolean warned | |
| ThreadPoolBudget | back to summary |
|---|---|
| public ThreadPoolBudget(ThreadPool. Construct a budget for a SizedThreadPool.
| |
| check | back to summary |
|---|---|
| public boolean check(int maxThreads) throws IllegalStateException Checks leases against the given number of
| |
| getLeasedThreads | back to summary |
|---|---|
public int getLeasedThreads()
| |
| getSizedThreadPool | back to summary |
|---|---|
| public ThreadPool. | |
| leaseFrom | back to summary |
|---|---|
| public static ThreadPoolBudget. | |
| leaseTo | back to summary |
|---|---|
| public ThreadPoolBudget. | |
| printInfoOnLeases | back to summary |
|---|---|
| private void printInfoOnLeases() | |
| reset | back to summary |
|---|---|
| public void reset() | |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| getThreads | back to summary |
|---|---|
| public int getThreads() | |
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final int |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. |
| public int |
| leasee | back to summary |
|---|---|
| private final Object leasee | |
| threads | back to summary |
|---|---|
| private final int threads | |
| Leased | back to summary |
|---|---|
| private Leased(Object leasee, int threads) | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| getThreads | back to summary |
|---|---|
| public int getThreads() Implements org.
| |