Package io.undertow.server
Class ConnectorStatisticsImpl
- java.lang.Object
-
- io.undertow.server.ConnectorStatisticsImpl
-
- All Implemented Interfaces:
ConnectorStatistics
public class ConnectorStatisticsImpl extends Object implements ConnectorStatistics
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description ConnectorStatisticsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecrementConnectionCount()longgetActiveConnections()longgetActiveRequests()longgetBytesReceived()longgetBytesSent()longgetErrorCount()longgetMaxActiveConnections()longgetMaxActiveRequests()longgetMaxProcessingTime()longgetProcessingTime()longgetRequestCount()voidincrementConnectionCount()ByteActivityCallbackreceivedAccumulator()voidrequestFinished(long bytesSent, long bytesReceived, boolean error)voidreset()Resets all values to zeroByteActivityCallbacksentAccumulator()voidsetup(HttpServerExchange exchange)voidupdateBytesReceived(long bytes)voidupdateBytesSent(long bytes)
-
-
-
Method Detail
-
getRequestCount
public long getRequestCount()
- Specified by:
getRequestCountin interfaceConnectorStatistics- Returns:
- The number of requests processed by this connector
-
getBytesSent
public long getBytesSent()
- Specified by:
getBytesSentin interfaceConnectorStatistics- Returns:
- The number of bytes sent on this connector
-
getBytesReceived
public long getBytesReceived()
- Specified by:
getBytesReceivedin interfaceConnectorStatistics- Returns:
- The number of bytes that have been received by this connector
-
getErrorCount
public long getErrorCount()
- Specified by:
getErrorCountin interfaceConnectorStatistics- Returns:
- The number of requests that triggered an error (i.e. 500) response.
-
getProcessingTime
public long getProcessingTime()
- Specified by:
getProcessingTimein interfaceConnectorStatistics- Returns:
- The total amount of time spent processing all requests on this connector (nanoseconds)
-
getMaxProcessingTime
public long getMaxProcessingTime()
- Specified by:
getMaxProcessingTimein interfaceConnectorStatistics- Returns:
- The time taken by the slowest request (nanoseconds)
-
reset
public void reset()
Description copied from interface:ConnectorStatisticsResets all values to zero- Specified by:
resetin interfaceConnectorStatistics
-
requestFinished
public void requestFinished(long bytesSent, long bytesReceived, boolean error)
-
updateBytesSent
public void updateBytesSent(long bytes)
-
updateBytesReceived
public void updateBytesReceived(long bytes)
-
setup
public void setup(HttpServerExchange exchange)
-
sentAccumulator
public ByteActivityCallback sentAccumulator()
-
receivedAccumulator
public ByteActivityCallback receivedAccumulator()
-
getActiveConnections
public long getActiveConnections()
- Specified by:
getActiveConnectionsin interfaceConnectorStatistics- Returns:
- The current number of active connections
-
getMaxActiveConnections
public long getMaxActiveConnections()
- Specified by:
getMaxActiveConnectionsin interfaceConnectorStatistics- Returns:
- The maximum number of active connections that have every been active on this connector
-
incrementConnectionCount
public void incrementConnectionCount()
-
decrementConnectionCount
public void decrementConnectionCount()
-
getActiveRequests
public long getActiveRequests()
- Specified by:
getActiveRequestsin interfaceConnectorStatistics- Returns:
- The current number of active requests
-
getMaxActiveRequests
public long getMaxActiveRequests()
- Specified by:
getMaxActiveRequestsin interfaceConnectorStatistics- Returns:
- The maximum number of active requests
-
-