Java thread pool hierarchical processing method and device
A technology of hierarchical processing and thread pools, applied in the field of thread pools, which can solve the problems of untimely thread processing, thread starvation, and untimely service response.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0070] figure 1 It is a schematic flow chart of the java thread pool hierarchical processing method in Embodiment 1 of the present invention. see figure 1 , the present embodiment provides a java thread pool hierarchical processing method, comprising:
[0071] Step S1, classify based on the types of business requests, and configure thread pools equal to the number of classes; Step S2, respectively set the priority levels of each thread pool, forming thread pools with different priority levels from high to low; Step S3, set The priority level of the current business request, and filter out the thread pool applicable to the current business request in turn; among them, the thread pool applicable to the current business request includes a thread pool that matches the priority level of the current business request and is lower than the priority level of the current business request; Step S4, among the applicable multiple thread pools, preferentially call the thread pool with hig...
Embodiment 2
[0088] see figure 1 and figure 2 , the present embodiment provides a java thread pool classification processing device, including a classification unit 1, a configuration unit 2, a first execution unit 3, a second execution unit 4 and a scheduling unit 5;
[0089]Grading unit 1 is used for grading based on the type of business request, and configures thread pools equal in number to the number of gradings;
[0090] The configuration unit 2 is used to respectively set the priority levels of each thread pool to form thread pools with different priority levels from high to low;
[0091] The first execution unit of the screening unit 3 is used to set the priority level of the current business request, and sequentially screen out the thread pool suitable for the current business request; wherein, the thread pool suitable for the current business request includes matching with the priority level of the current business request, and comparing A thread pool with a low priority for c...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

