1 22 package org.jboss.resource.statistic.pool; 23 24 import org.jboss.resource.statistic.JBossStatistics; 25 26 32 public class JBossSubPoolStatistics implements JBossStatistics 33 { 34 35 36 private static final long serialVersionUID = -5089686321382050654L; 37 38 39 private Boolean trackByTxn; 40 41 42 private long availableConnections; 43 44 45 private int maxConnectionsInUse; 46 47 48 private int connectionsInUse; 49 50 51 private int connectionsDestroyed; 52 53 54 private long totalBlockTime; 55 56 57 private long averageBlockTime; 58 59 60 private int totalTimedOut; 61 62 67 public long getAvailableConnections() 68 { 69 return availableConnections; 70 } 71 72 73 78 public void setAvailableConnections(long availableConnections) 79 { 80 this.availableConnections = availableConnections; 81 } 82 83 84 89 public int getConnectionsDestroyed() 90 { 91 return connectionsDestroyed; 92 } 93 94 95 100 public void setConnectionsDestroyed(int connectionsDestroyed) 101 { 102 this.connectionsDestroyed = connectionsDestroyed; 103 } 104 105 106 111 public int getConnectionsInUse() 112 { 113 return connectionsInUse; 114 } 115 116 117 122 public void setConnectionsInUse(int connectionsInUse) 123 { 124 this.connectionsInUse = connectionsInUse; 125 } 126 127 128 133 public int getMaxConnectionsInUse() 134 { 135 return maxConnectionsInUse; 136 } 137 138 139 144 public void setMaxConnectionsInUse(int maxConnectionsInUse) 145 { 146 this.maxConnectionsInUse = maxConnectionsInUse; 147 } 148 149 150 155 public Boolean getTrackByTxn() 156 { 157 return trackByTxn; 158 } 159 160 161 166 public void setTrackByTxn(Boolean trackByTxn) 167 { 168 this.trackByTxn = trackByTxn; 169 } 170 171 172 public String toString() 173 { 174 final StringBuffer statBuff = new StringBuffer (); 175 statBuff.append("Track By Transaction: " + getTrackByTxn() + "\n"); 176 statBuff.append("Available Connections Count: " + getAvailableConnections() + "\n"); 177 statBuff.append("Max Connections In Use Count:" + getMaxConnectionsInUse() + "\n"); 178 statBuff.append("Connections Destroyed Count:" + getConnectionsDestroyed() + "\n"); 179 statBuff.append("Connections In Use Count:" + getConnectionsInUse() + "\n"); 180 statBuff.append("Total Block Time:" + getTotalBlockTime() + "\n"); 181 statBuff.append("Average Block Time For Sub Pool:" + getTotalBlockTime() + "\n"); 182 183 statBuff.append("Total Timed Out:" + getTotalTimedOut() + "\n"); 184 185 return statBuff.toString(); 186 } 187 188 189 194 public long getTotalBlockTime() 195 { 196 return totalBlockTime; 197 } 198 199 200 205 public void setTotalBlockTime(long totalBlockTime) 206 { 207 this.totalBlockTime = totalBlockTime; 208 } 209 210 211 216 public int getTotalTimedOut() 217 { 218 return totalTimedOut; 219 } 220 221 222 227 public void setTotalTimedOut(int totalTimedOut) 228 { 229 this.totalTimedOut = totalTimedOut; 230 } 231 232 233 238 public long getAverageBlockTime() 239 { 240 return averageBlockTime; 241 } 242 243 244 249 public void setAverageBlockTime(long averageBlockTime) 250 { 251 this.averageBlockTime = averageBlockTime; 252 } 253 254 } 255 | Popular Tags |