Coverage Report - org.mule.management.stats.SedaComponentStatistics
 
Classes in this File Line Coverage Branch Coverage Complexity
SedaComponentStatistics
78%
14/18
50%
1/2
1.167
 
 1  
 /*
 2  
  * $Id: SedaComponentStatistics.java 7963 2007-08-21 08:53:15Z 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  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  
 }