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 private int componentPoolMaxSize = 0;
18 private int componentPoolAbsoluteMaxSize = 0;
19 private int componentPoolSize = 0;
20
21 public SedaComponentStatistics(String name, int threadPoolSize, int componentPoolsize)
22 {
23 super(name, threadPoolSize);
24 this.componentPoolMaxSize = componentPoolsize;
25 this.componentPoolAbsoluteMaxSize = componentPoolMaxSize;
26 }
27
28 public synchronized void clear()
29 {
30 componentPoolSize = 0;
31 componentPoolAbsoluteMaxSize = 0;
32 super.clear();
33 }
34
35 public int getComponentPoolMaxSize()
36 {
37 return componentPoolMaxSize;
38 }
39
40 public int getComponentPoolAbsoluteMaxSize()
41 {
42 return componentPoolAbsoluteMaxSize;
43 }
44
45 public int getComponentPoolSize()
46 {
47 return componentPoolSize;
48 }
49
50 public synchronized void setComponentPoolSize(int componentPoolSize)
51 {
52 this.componentPoolSize = componentPoolSize;
53 if (componentPoolSize > componentPoolAbsoluteMaxSize)
54 {
55 componentPoolAbsoluteMaxSize = componentPoolSize;
56 }
57 }
58 }