Package software.amazon.awssdk.crt.http
Class HttpMonitoringOptions
- java.lang.Object
-
- software.amazon.awssdk.crt.http.HttpMonitoringOptions
-
public class HttpMonitoringOptions extends Object
This class provides access to basic http connection monitoring controls in lieu of the more traditional timeouts. The user can set a throughput threshold (in bytes per second) for the a connection to be considered healthy. If the connection falls below this threshold for a configurable amount of time, then the connection is considered unhealthy and shut down. Throughput/health is only measured when the connection has work (read or write) that needs to be done.
-
-
Constructor Summary
Constructors Constructor Description HttpMonitoringOptions()
Creates a new set of monitoring options
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAllowableThroughputFailureIntervalSeconds()
long
getMinThroughputBytesPerSecond()
void
setAllowableThroughputFailureIntervalSeconds(int allowableThroughputFailureIntervalSeconds)
Sets how long, in seconds, a connection is allowed to be unhealthy before getting shut down.void
setMinThroughputBytesPerSecond(long minThroughputBytesPerSecond)
Sets a throughput threshold for connections.
-
-
-
Method Detail
-
setMinThroughputBytesPerSecond
public void setMinThroughputBytesPerSecond(long minThroughputBytesPerSecond)
Sets a throughput threshold for connections. Throughput below this value will be considered unhealthy.- Parameters:
minThroughputBytesPerSecond
- minimum amount of throughput, in bytes per second, for a connection to be considered healthy.
-
getMinThroughputBytesPerSecond
public long getMinThroughputBytesPerSecond()
- Returns:
- minimum amount of throughput, in bytes per second, for a connection to be considered healthy.
-
setAllowableThroughputFailureIntervalSeconds
public void setAllowableThroughputFailureIntervalSeconds(int allowableThroughputFailureIntervalSeconds)
Sets how long, in seconds, a connection is allowed to be unhealthy before getting shut down. Must be at least two.- Parameters:
allowableThroughputFailureIntervalSeconds
- How long, in seconds, a connection is allowed to be unhealthy before getting shut down.
-
getAllowableThroughputFailureIntervalSeconds
public int getAllowableThroughputFailureIntervalSeconds()
- Returns:
- How long, in seconds, a connection is allowed to be unhealthy before getting shut down. Must be at least two.
-
-