1 23 package com.sun.enterprise.web.connector.grizzly; 24 25 35 public class KeepAliveStats { 36 37 private int countConnections; 38 private int maxConnections; 39 private int countHits; 40 private int countFlushes; 41 private int countRefusals; 42 private int countTimeouts; 43 private int secondsTimeouts; 44 45 46 51 public synchronized int getCountConnections() { 52 return countConnections; 53 } 54 55 56 59 public synchronized void incrementCountConnections() { 60 countConnections++; 61 } 62 63 64 70 public void setMaxConnections(int maxConnections) { 71 this.maxConnections = maxConnections; 72 } 73 74 75 80 public int getMaxConnections() { 81 return maxConnections; 82 } 83 84 85 90 public synchronized int getCountHits() { 91 return countHits; 92 } 93 94 95 99 public synchronized void incrementCountHits() { 100 countHits++; 101 } 102 103 104 109 public synchronized int getCountFlushes() { 110 return countFlushes; 111 } 112 113 114 117 public synchronized void incrementCountFlushes() { 118 countFlushes++; 119 } 120 121 122 127 public synchronized int getCountRefusals() { 128 return countRefusals; 129 } 130 131 132 135 public synchronized void incrementCountRefusals() { 136 countRefusals++; 137 } 138 139 140 145 public synchronized int getCountTimeouts() { 146 return countTimeouts; 147 } 148 149 150 153 public synchronized void incrementCountTimeouts() { 154 countTimeouts++; 155 } 156 157 158 164 public void setSecondsTimeouts(int timeout) { 165 secondsTimeouts = timeout; 166 } 167 168 169 175 public int getSecondsTimeouts() { 176 return secondsTimeouts; 177 } 178 } 179 | Popular Tags |