Class HealthChecker


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20170115")
    public final class HealthChecker
    extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
    The health check policy configuration.

    For more information, see Editing Health Check Policies.
    Note: Objects should always be created or deserialized using the HealthChecker.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of the HealthChecker.Builder, which maintain a set of all explicitly set fields called HealthChecker.Builder.__explicitlySet__. The hashCode() and equals(Object) methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).

    • Method Detail

      • getProtocol

        public String getProtocol()
        The protocol the health check must use; either HTTP or TCP.

        Example: HTTP

        Returns:
        the value
      • getUrlPath

        public String getUrlPath()
        The path against which to run the health check.

        Example: /healthcheck

        Returns:
        the value
      • getPort

        public Integer getPort()
        The backend server port against which to run the health check.

        If the port is not specified, the load balancer uses the port information from the Backend object.

        Example: 8080

        Returns:
        the value
      • getReturnCode

        public Integer getReturnCode()
        The status code a healthy backend server should return.

        If you configure the health check policy to use the HTTP protocol, you can use common HTTP status codes such as “200”.

        Example: 200

        Returns:
        the value
      • getRetries

        public Integer getRetries()
        The number of retries to attempt before a backend server is considered “unhealthy”.

        This number also applies when recovering a server to the “healthy” state. Defaults to 3.

        Example: 3

        Returns:
        the value
      • getTimeoutInMillis

        public Integer getTimeoutInMillis()
        The maximum time, in milliseconds, to wait for a reply to a health check.

        A health check is successful only if a reply returns within this timeout period. Defaults to 3000 (3 seconds).

        Example: 3000

        Returns:
        the value
      • getIntervalInMillis

        public Integer getIntervalInMillis()
        The interval between health checks, in milliseconds.

        The default is 10000 (10 seconds).

        Example: 10000

        Returns:
        the value
      • getResponseBodyRegex

        public String getResponseBodyRegex()
        A regular expression for parsing the response body from the backend server.

        Example: ^((?!false).|\\s)*$

        Returns:
        the value
      • getIsForcePlainText

        public Boolean getIsForcePlainText()
        Specifies if health checks should always be done using plain text instead of depending on whether or not the associated backend set is using SSL.

        If "true", health checks will be done using plain text even if the associated backend set is configured to use SSL.

        If "false", health checks will be done using SSL encryption if the associated backend set is configured to use SSL. If the backend set is not so configured the health checks will be done using plain text.

        Example: false

        Returns:
        the value
      • toString

        public String toString()
        Overrides:
        toString in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel