View Javadoc

1   /*
2    * $Id: SedaComponentStatistics.java 7976 2007-08-21 14:26:13Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.management.stats;
11  
12  /**
13   * TODO
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  }