com.sun.grizzly.http
Class PipelineStatistic

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

public class PipelineStatistic
extends Object

This class is a placeholde for gathering statistic from a Pipeline

Author:
Jean-Francois Arcand

Constructor Summary
PipelineStatistic(int port)
          Constructor
 
Method Summary
 boolean gather(int queueLength)
          Gather Pipeline statistic.
 int getCountOverflows()
          Total number of pipeline overflow
 int getCountQueued()
          Gets the number of connections currently in the queue
 int getCountQueued15MinuteAverage()
          Gets the average number of connections queued in the last 15 minutes
 int getCountQueued1MinuteAverage()
          Gets the average number of connections queued in the last 1 minute
 int getCountQueued5MinuteAverage()
          Gets the average number of connections queued in the last 5 minutes
 int getCountTotalConnections()
          Gets the total number of connections that have been accepted.
 int getCountTotalQueued()
          Gets the total number of connections that have been queued.
 int getMaxQueued()
          Gets the maximum size of the connection queue
 int getPeakQueued()
          Gets the largest number of connections that were in the queue simultaneously.
 int getQueueSizeInBytes()
          Get the maximum pending connection this Pipeline can handle.
 int getTicksTotalQueued()
          Gets the total number of ticks that connections have spent in the queue.
 void incrementTotalAcceptCount()
           
 void setQueueSizeInBytes(int maxQueueSizeInBytesCount)
          Set the maximum pending connection this Pipeline can handle.
 void start()
          Start gathering statistics.
 void stop()
          Stop gathering statistics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelineStatistic

public PipelineStatistic(int port)
Constructor

Parameters:
port - Port number for which pipeline (connection) stats will be gathered
Method Detail

start

public void start()
Start gathering statistics.


stop

public void stop()
Stop gathering statistics.


gather

public boolean gather(int queueLength)
Gather Pipeline statistic.


getCountOverflows

public int getCountOverflows()
Total number of pipeline overflow


getPeakQueued

public int getPeakQueued()
Gets the largest number of connections that were in the queue simultaneously.

Returns:
Largest number of connections that were in the queue simultaneously

getMaxQueued

public int getMaxQueued()
Gets the maximum size of the connection queue

Returns:
Maximum size of the connection queue

getCountTotalConnections

public int getCountTotalConnections()
Gets the total number of connections that have been accepted.

Returns:
Total number of connections that have been accepted.

setQueueSizeInBytes

public void setQueueSizeInBytes(int maxQueueSizeInBytesCount)
Set the maximum pending connection this Pipeline can handle.


getQueueSizeInBytes

public int getQueueSizeInBytes()
Get the maximum pending connection this Pipeline can handle.


getCountTotalQueued

public int getCountTotalQueued()
Gets the total number of connections that have been queued. A given connection may be queued multiple times, so counttotalqueued may be greater than or equal to counttotalconnections.

Returns:
Total number of connections that have been queued

getCountQueued

public int getCountQueued()
Gets the number of connections currently in the queue

Returns:
Number of connections currently in the queue

getTicksTotalQueued

public int getTicksTotalQueued()
Gets the total number of ticks that connections have spent in the queue. A tick is a system-dependent unit of time.

Returns:
Total number of ticks that connections have spent in the queue

getCountQueued1MinuteAverage

public int getCountQueued1MinuteAverage()
Gets the average number of connections queued in the last 1 minute

Returns:
Average number of connections queued in the last 1 minute

getCountQueued5MinuteAverage

public int getCountQueued5MinuteAverage()
Gets the average number of connections queued in the last 5 minutes

Returns:
Average number of connections queued in the last 5 minutes

getCountQueued15MinuteAverage

public int getCountQueued15MinuteAverage()
Gets the average number of connections queued in the last 15 minutes

Returns:
Average number of connections queued in the last 15 minutes

incrementTotalAcceptCount

public void incrementTotalAcceptCount()


Copyright © 2011 SUN Microsystems. All Rights Reserved.