1 28 package org.objectweb.jonas.resource.pool.api; 29 30 34 public class PoolItemStats { 35 36 39 private long maxAgeTimeout = 0L; 40 43 private long maxOpenTimeout = 0L; 44 47 private long startTime = 0L; 48 51 private long totalConnectionTime = 0L; 52 53 56 private int uses = 0; 57 58 61 public PoolItemStats() { 62 } 63 64 68 public long getMaxAgeTimeout() { 69 return maxAgeTimeout; 70 } 71 72 76 public void setMaxAgeTimeout(long pTime) { 77 maxAgeTimeout = pTime; 78 } 79 80 84 public long getMaxOpenTimeout() { 85 return maxOpenTimeout; 86 } 87 88 92 public void setMaxOpenTimeout(long pTime) { 93 maxOpenTimeout = pTime; 94 } 95 96 100 public long getStartTime() { 101 return startTime; 102 } 103 104 108 public void setStartTime(long pTime) { 109 startTime = pTime; 110 } 111 112 116 public long getTotalConnectionTime() { 117 return totalConnectionTime; 118 } 119 120 124 public void setTotalConnectionTime(long pTime) { 125 totalConnectionTime += pTime; 126 } 127 128 132 public int getUses() { 133 return uses; 134 } 135 136 139 public void incrementUses() { 140 uses++; 141 } 142 143 147 public String toString() { 148 String out = "MaxAgeTimeout = " + maxAgeTimeout 149 + "\nMaxOpenTimeout = " + maxOpenTimeout 150 + "\nStartTime = " + startTime 151 + "\nTotalConnectionTime = " + totalConnectionTime 152 + "\nUses = " + uses; 153 return out; 154 } 155 156 } | Popular Tags |