Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source.
   * Copyright 2006, Red Hat Middleware LLC, and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.jboss.resource.statistic.pool;
 
A SubPoolStatisticGroup.

Author(s):
Weston Price
Version:
$Revision: 71554 $
 
 public class JBossSubPoolStatistics implements JBossStatistics
 {

   
The serialVersionUID
 
    private static final long serialVersionUID = -5089686321382050654L;

   
The trackByTxn
 
    private Boolean trackByTxn;
   
   
The availableConnections
 
    private long availableConnections;
   
   
The maxConnectionsInUse
 
    private int maxConnectionsInUse;
   
   
The connectionsInUse
 
    private int connectionsInUse;
   
   
The connectionsDestroyed
 
    private int connectionsDestroyed;

   
The totalBlockTime
 
    private long totalBlockTime;
   
   
The averageBlockTime
 
    private long averageBlockTime;
   
   
The totalTimedOut
 
    private int totalTimedOut;
   
   
The maxWaitTime
 
    private long maxWaitTime;

   
Get the availableConnections.

Returns:
the availableConnections.
 
    public long getAvailableConnections()
    {
       return ;
    }


   
Set the availableConnections.

Parameters:
availableConnections The availableConnections to set.
 
    public void setAvailableConnections(long availableConnections)
    {
       this. = availableConnections;
    }


   
Get the connectionsDestroyed.

Returns:
the connectionsDestroyed.
 
    public int getConnectionsDestroyed()
    {
       return ;
    }


   
Set the connectionsDestroyed.

Parameters:
connectionsDestroyed The connectionsDestroyed to set.
   public void setConnectionsDestroyed(int connectionsDestroyed)
   {
      this. = connectionsDestroyed;
   }


   
Get the connectionsInUse.

Returns:
the connectionsInUse.
   public int getConnectionsInUse()
   {
      return ;
   }


   
Set the connectionsInUse.

Parameters:
connectionsInUse The connectionsInUse to set.
   public void setConnectionsInUse(int connectionsInUse)
   {
      this. = connectionsInUse;
   }


   
Get the maxConnectionsInUse.

Returns:
the maxConnectionsInUse.
   public int getMaxConnectionsInUse()
   {
      return ;
   }


   
Set the maxConnectionsInUse.

Parameters:
maxConnectionsInUse The maxConnectionsInUse to set.
   public void setMaxConnectionsInUse(int maxConnectionsInUse)
   {
      this. = maxConnectionsInUse;
   }


   
Get the trackByTxn.

Returns:
the trackByTxn.
   public Boolean getTrackByTxn()
   {
      return ;
   }


   
Set the trackByTxn.

Parameters:
trackByTxn The trackByTxn to set.
   public void setTrackByTxn(Boolean trackByTxn)
   {
      this. = trackByTxn;
   }
   public String toString()
   {
      final StringBuffer statBuff = new StringBuffer();      
      statBuff.append("Track By Transaction: " + getTrackByTxn() + "\n");
      statBuff.append("Available Connections Count: " + getAvailableConnections() + "\n");
      statBuff.append("Max Connections In Use Count:" + getMaxConnectionsInUse() + "\n");
      statBuff.append("Connections Destroyed Count:" + getConnectionsDestroyed() + "\n");
      statBuff.append("Connections In Use Count:" + getConnectionsInUse() + "\n");
      statBuff.append("Total Block Time:" + getTotalBlockTime() + "\n");
      statBuff.append("Average Block Time For Sub Pool:" + getAverageBlockTime() + "\n");
      statBuff.append("Maximum Wait Time For Sub Pool:" + getMaxWaitTime() + "\n");
      
      statBuff.append("Total Timed Out:" + getTotalTimedOut() + "\n");
      return statBuff.toString();
   }


   
Get the totalBlockTime.

Returns:
the totalBlockTime.
   public long getTotalBlockTime()
   {
      return ;
   }


   
Set the totalBlockTime.

Parameters:
totalBlockTime The totalBlockTime to set.
   public void setTotalBlockTime(long totalBlockTime)
   {
      this. = totalBlockTime;
   }


   
Get the totalTimedOut.

Returns:
the totalTimedOut.
   public int getTotalTimedOut()
   {
      return ;
   }


   
Set the totalTimedOut.

Parameters:
totalTimedOut The totalTimedOut to set.
   public void setTotalTimedOut(int totalTimedOut)
   {
      this. = totalTimedOut;
   }


   
Get the averageBlockTime.

Returns:
the averageBlockTime.
   public long getAverageBlockTime()
   {
      return ;
   }


   
Set the averageBlockTime.

Parameters:
averageBlockTime The averageBlockTime to set.
   public void setAverageBlockTime(long averageBlockTime)
   {
      this. = averageBlockTime;
   }
   
   
Get the maxWaitTime.

Returns:
the maxWaitTime.
   public long getMaxWaitTime()
   {
      return ;
   }

   
Set the maxWaitTime.

Parameters:
maxWaitTime The averageBlockTime to set.
   public void setMaxWaitTime(long maxWaitTime)
   {
      this. = maxWaitTime;
   }
   
New to GrepCode? Check out our FAQ X