1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule.management.stats; |
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
public class SedaComponentStatistics extends ComponentStatistics |
16 | |
{ |
17 | 34 | private int componentPoolMaxSize = 0; |
18 | 34 | private int componentPoolAbsoluteMaxSize = 0; |
19 | 34 | private int componentPoolSize = 0; |
20 | |
|
21 | |
public SedaComponentStatistics(String name, int threadPoolSize, int componentPoolsize) |
22 | |
{ |
23 | 34 | super(name, threadPoolSize); |
24 | 34 | this.componentPoolMaxSize = componentPoolsize; |
25 | 34 | this.componentPoolAbsoluteMaxSize = componentPoolMaxSize; |
26 | 34 | } |
27 | |
|
28 | |
public synchronized void clear() |
29 | |
{ |
30 | 34 | componentPoolSize = 0; |
31 | 34 | componentPoolAbsoluteMaxSize = 0; |
32 | 34 | super.clear(); |
33 | 34 | } |
34 | |
|
35 | |
public int getComponentPoolMaxSize() |
36 | |
{ |
37 | 0 | return componentPoolMaxSize; |
38 | |
} |
39 | |
|
40 | |
public int getComponentPoolAbsoluteMaxSize() |
41 | |
{ |
42 | 0 | return componentPoolAbsoluteMaxSize; |
43 | |
} |
44 | |
|
45 | |
public int getComponentPoolSize() |
46 | |
{ |
47 | 0 | return componentPoolSize; |
48 | |
} |
49 | |
|
50 | |
public synchronized void setComponentPoolSize(int componentPoolSize) |
51 | |
{ |
52 | 16 | this.componentPoolSize = componentPoolSize; |
53 | 16 | if (componentPoolSize > componentPoolAbsoluteMaxSize) |
54 | |
{ |
55 | 0 | componentPoolAbsoluteMaxSize = componentPoolSize; |
56 | |
} |
57 | 16 | } |
58 | |
} |