Class HttpMonitoringOptions


  • public class HttpMonitoringOptions
    extends java.lang.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 Detail

      • HttpMonitoringOptions

        public HttpMonitoringOptions()
        Creates a new set of monitoring options
    • 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.