Class ThreadPoolBudget
java.lang.Object
org.eclipse.jetty.util.thread.ThreadPoolBudget
A budget of required thread usage, used to warn or error for insufficient configured threads.
- See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceclassAn allocation of threads - 
Constructor Summary
ConstructorsConstructorDescriptionConstruct a budget for a SizedThreadPool. - 
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(int maxThreads) Checks leases against the given number ofmaxThreads.intstatic ThreadPoolBudget.Leasevoidreset()toString() 
- 
Constructor Details
- 
ThreadPoolBudget
Construct a budget for a SizedThreadPool.- Parameters:
 pool- The pool to budget thread allocation for.
 
 - 
 - 
Method Details
- 
getSizedThreadPool
 - 
getLeasedThreads
 - 
reset
public void reset() - 
leaseTo
 - 
check
Checks leases against the given number of
maxThreads.- Parameters:
 maxThreads- A proposed change to the maximum threads to check.- Returns:
 - true if passes check, false if otherwise (see logs for details)
 - Throws:
 IllegalStateException- if insufficient threads are configured.
 - 
leaseFrom
 - 
toString
 
 -