com.sun.grizzly.http
Class KeepAliveStats

java.lang.Object
  extended by com.sun.grizzly.http.KeepAliveStats

public class KeepAliveStats
extends Object

Class collecting keep-alive statistics. There is one instance of this class per HTTP listener (ie., SelectorThread). Each instance exposes its stats as an MBean with an object name of the form ":type=KeepAlive,name=http", where is replaced with the port number of the associated HTTP listener.

Author:
Jan Luehe

Constructor Summary
KeepAliveStats()
           
 
Method Summary
protected  void decrementCountConnections()
          Decrement the number of connections in keep-alive mode.
 int getCountConnections()
          Gets the number of connections in keep-alive mode.
 int getCountFlushes()
          Gets the number of keep-alive connections that were closed
 int getCountHits()
          Gets the number of requests received by connections in keep-alive mode.
 int getCountRefusals()
          Gets the number of keep-alive connections that were rejected.
 int getCountTimeouts()
          Gets the number of keep-alive connections that timed out.
 void incrementCountConnections()
          Increments the number of connections in keep-alive mode.
 void incrementCountFlushes()
          Increments the number of keep-alive connections that were closed
 void incrementCountHits()
          Increments the number of requests received by connections in keep-alive mode.
 void incrementCountRefusals()
          Increments the number of keep-alive connections that were rejected.
 void incrementCountTimeouts()
          Increments the number of keep-alive connections that timed out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeepAliveStats

public KeepAliveStats()
Method Detail

getCountConnections

public int getCountConnections()
Gets the number of connections in keep-alive mode.

Returns:
Number of connections in keep-alive mode

incrementCountConnections

public void incrementCountConnections()
Increments the number of connections in keep-alive mode.


decrementCountConnections

protected void decrementCountConnections()
Decrement the number of connections in keep-alive mode.


getCountHits

public int getCountHits()
Gets the number of requests received by connections in keep-alive mode.

Returns:
Number of requests received by connections in keep-alive mode.

incrementCountHits

public void incrementCountHits()
Increments the number of requests received by connections in keep-alive mode.


getCountFlushes

public int getCountFlushes()
Gets the number of keep-alive connections that were closed

Returns:
Number of keep-alive connections that were closed

incrementCountFlushes

public void incrementCountFlushes()
Increments the number of keep-alive connections that were closed


getCountRefusals

public int getCountRefusals()
Gets the number of keep-alive connections that were rejected.

Returns:
Number of keep-alive connections that were rejected.

incrementCountRefusals

public void incrementCountRefusals()
Increments the number of keep-alive connections that were rejected.


getCountTimeouts

public int getCountTimeouts()
Gets the number of keep-alive connections that timed out.

Returns:
Number of keep-alive connections that timed out.

incrementCountTimeouts

public void incrementCountTimeouts()
Increments the number of keep-alive connections that timed out.



Copyright © 2009 SUN Microsystems. All Rights Reserved.