- 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 Summary
Fields Modifier and Type Field Description static intDNS_ATTEMPTSThe number of DNS tries.static DurationDNS_CHECK_INTERVALChecks the DNS settings once every 30 seconds.static DurationDNS_CHECK_TIMEOUTDNS queries time-out at 30 seconds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceDnsResultgetLastResult()Gets the last result.Resource<?,?>getResource()Gets the resource this monitor is for.
-
-
-
Field Detail
-
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:
- Constant Field Values
-
DNS_CHECK_TIMEOUT
public static final Duration DNS_CHECK_TIMEOUT
DNS queries time-out at 30 seconds.
-
-
Method Detail
-
getResource
public Resource<?,?> getResource()
Gets the resource this monitor is for.
-
getLastResult
public ResourceDnsResult getLastResult()
Gets the last result.
-
-