Class ResourceDnsMonitor

java.lang.Object
com.aoapps.appcluster.ResourceDnsMonitor

public class ResourceDnsMonitor extends Object
Monitors the status of a resource by monitoring its role based on DNS entries Monitors DNS entries to determine which nodes are masters and which are slaves while being careful to detect any inconsistent states.
Author:
AO Industries, Inc.
  • Field Details

    • DNS_CHECK_INTERVAL

      public static final Duration DNS_CHECK_INTERVAL
      Checks the DNS settings once every 30 seconds.
    • DNS_ATTEMPTS

      public static final int DNS_ATTEMPTS
      The number of DNS tries.
      See Also:
    • DNS_CHECK_TIMEOUT

      public static final Duration DNS_CHECK_TIMEOUT
      DNS queries time-out at 30 seconds.
  • Method Details

    • getResource

      public Resource<?,?> getResource()
      Gets the resource this monitor is for.
    • getLastResult

      public ResourceDnsResult getLastResult()
      Gets the last result.