Class Resource<R extends Resource<R,​RN>,​RN extends ResourceNode<R,​RN>>

  • Direct Known Subclasses:
    CronResource

    public abstract class Resource<R extends Resource<R,​RN>,​RN extends ResourceNode<R,​RN>>
    extends Object
    Monitors the status of a resource by monitoring its role based on DNS entries and synchronizing the resource on an as-needed and/or scheduled basis.
    Author:
    AO Industries, Inc.
    See Also:
    ResourceDnsMonitor
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getCluster

        public AppCluster getCluster()
        Gets the cluster this resource is part of.
      • getId

        public String getId()
        The unique ID of this resource.
      • isEnabled

        public boolean isEnabled()
        Determines if both the cluster and this resource are enabled.
      • getDisplay

        public String getDisplay()
        Gets the display name of this resource.
      • getMasterRecords

        public Set<? extends Name> getMasterRecords()
        Gets the set of master records that must all by the same. The master node is determined by matching these records against the resource node configuration's node records.
      • getMasterRecordsTtl

        public int getMasterRecordsTtl()
        Gets the expected TTL value for the master record.
      • getEnabledNameservers

        public Set<? extends Nameserver> getEnabledNameservers()
        Gets the set of all nameservers used by all enabled nodes.
      • getDnsMonitor

        public ResourceDnsMonitor getDnsMonitor()
        Gets the DNS monitor for this resource.
      • getResourceNodes

        public Set<? extends RN> getResourceNodes()
      • getStatus

        public ResourceStatus getStatus()
        Gets the status of this resource based on disabled, last monitoring results, and synchronization state.
      • getAllowMultiMaster

        public abstract boolean getAllowMultiMaster()
        Gets if this resource allows multiple master servers.
      • getType

        public String getType()
        Gets the replication type of this resource.
      • getSynchronizerMap

        public Map<Node,​ResourceSynchronizer<R,​RN>> getSynchronizerMap()
        Gets a map-view of the resource synchronizers keyed on remote node. If the local node is not part of the resource nodes, returns an empty map.