View Javadoc
1   /*
2    * Licensed under the GPL License. You may not use this file except in compliance with the License.
3    * You may obtain a copy of the License at
4    *
5    *   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6    *
7    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8    * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9    * PURPOSE.
10   */
11  package psiprobe.model;
12  
13  /**
14   * POJO representing thread pool.
15   */
16  public class ThreadPool {
17  
18    /** The name. */
19    private String name;
20  
21    /** The max threads. */
22    private int maxThreads;
23  
24    /** The min spare threads. */
25    private int minSpareThreads;
26  
27    /** The max spare threads. */
28    private int maxSpareThreads;
29  
30    /** The current thread count. */
31    private int currentThreadCount;
32  
33    /** The current threads busy. */
34    private int currentThreadsBusy;
35  
36    /**
37     * Gets the name.
38     *
39     * @return the name
40     */
41    public String getName() {
42      return name;
43    }
44  
45    /**
46     * Sets the name.
47     *
48     * @param name the new name
49     */
50    public void setName(String name) {
51      this.name = name;
52    }
53  
54    /**
55     * Gets the max threads.
56     *
57     * @return the max threads
58     */
59    public int getMaxThreads() {
60      return maxThreads;
61    }
62  
63    /**
64     * Sets the max threads.
65     *
66     * @param maxThreads the new max threads
67     */
68    public void setMaxThreads(int maxThreads) {
69      this.maxThreads = maxThreads;
70    }
71  
72    /**
73     * Gets the min spare threads.
74     *
75     * @return the min spare threads
76     */
77    public int getMinSpareThreads() {
78      return minSpareThreads;
79    }
80  
81    /**
82     * Sets the min spare threads.
83     *
84     * @param minSpareThreads the new min spare threads
85     */
86    public void setMinSpareThreads(int minSpareThreads) {
87      this.minSpareThreads = minSpareThreads;
88    }
89  
90    /**
91     * Gets the max spare threads.
92     *
93     * @return the max spare threads
94     */
95    public int getMaxSpareThreads() {
96      return maxSpareThreads;
97    }
98  
99    /**
100    * Sets the max spare threads.
101    *
102    * @param maxSpareThreads the new max spare threads
103    */
104   public void setMaxSpareThreads(int maxSpareThreads) {
105     this.maxSpareThreads = maxSpareThreads;
106   }
107 
108   /**
109    * Gets the current thread count.
110    *
111    * @return the current thread count
112    */
113   public int getCurrentThreadCount() {
114     return currentThreadCount;
115   }
116 
117   /**
118    * Sets the current thread count.
119    *
120    * @param currentThreadCount the new current thread count
121    */
122   public void setCurrentThreadCount(int currentThreadCount) {
123     this.currentThreadCount = currentThreadCount;
124   }
125 
126   /**
127    * Gets the current threads busy.
128    *
129    * @return the current threads busy
130    */
131   public int getCurrentThreadsBusy() {
132     return currentThreadsBusy;
133   }
134 
135   /**
136    * Sets the current threads busy.
137    *
138    * @param currentThreadsBusy the new current threads busy
139    */
140   public void setCurrentThreadsBusy(int currentThreadsBusy) {
141     this.currentThreadsBusy = currentThreadsBusy;
142   }
143 
144 }