FileDocCategorySizeDatePackage
KeepAliveStats.javaAPI DocGlassfish v2 API5940Fri May 04 22:37:04 BST 2007com.sun.enterprise.web.connector.grizzly

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

Fields Summary
private int
countConnections
private int
maxConnections
private int
countHits
private int
countFlushes
private int
countRefusals
private int
countTimeouts
private int
secondsTimeouts
Constructors Summary
Methods Summary
public synchronized intgetCountConnections()
Gets the number of connections in keep-alive mode.

return
Number of connections in keep-alive mode

        return countConnections;
    
public synchronized intgetCountFlushes()
Gets the number of keep-alive connections that were closed

return
Number of keep-alive connections that were closed

        return countFlushes;
    
public synchronized intgetCountHits()
Gets the number of requests received by connections in keep-alive mode.

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

        return countHits;
    
public synchronized intgetCountRefusals()
Gets the number of keep-alive connections that were rejected.

return
Number of keep-alive connections that were rejected.

        return countRefusals;
    
public synchronized intgetCountTimeouts()
Gets the number of keep-alive connections that timed out.

return
Number of keep-alive connections that timed out.

        return countTimeouts;
    
public intgetMaxConnections()
Gets the maximum number of concurrent connections in keep-alive mode.

return
Maximum number of concurrent connections in keep-alive mode

        return maxConnections;
    
public intgetSecondsTimeouts()
Gets the number of seconds before a keep-alive connection that has been idle times out and is closed.

return
Keep-alive timeout in number of seconds

        return secondsTimeouts;
    
public synchronized voidincrementCountConnections()
Increments the number of connections in keep-alive mode.

        countConnections++;
    
public synchronized voidincrementCountFlushes()
Increments the number of keep-alive connections that were closed

        countFlushes++;
    
public synchronized voidincrementCountHits()
Increments the number of requests received by connections in keep-alive mode.

        countHits++;
    
public synchronized voidincrementCountRefusals()
Increments the number of keep-alive connections that were rejected.

        countRefusals++;
    
public synchronized voidincrementCountTimeouts()
Increments the number of keep-alive connections that timed out.

        countTimeouts++;
    
public voidsetMaxConnections(int maxConnections)
Sets the maximum number of concurrent connections in keep-alive mode.

param
maxConnections Maximum number of concurrent connections in keep-alive mode.

        this.maxConnections = maxConnections;
    
public voidsetSecondsTimeouts(int timeout)
Sets the number of seconds before a keep-alive connection that has been idle times out and is closed.

param
timeout Keep-alive timeout in number of seconds

        secondsTimeouts = timeout;