Package jade.core

Class NodeFailureMonitor

  • Direct Known Subclasses:
    BlockingNodeFailureMonitor

    public abstract class NodeFailureMonitor
    extends Object
    The abstract class NodeFailureMonitor provides a basic implementation for classes that are used to monitor the availability of nodes and detect node failures. In addition to that it provides static methods to initialize and create instances of monitors depending on the current settings in the profile. An instance of a subclass of the NodeFailureMonitor can only supervise a single node. If there are additional nodes in the same JVM, you can add these as child nodes. A child node is not supervised directly. Instead it has always the same state than its parent node. So if the parent node gets unreachable automatically all its child nodes will turn to the state unreachable.

    Since JADE 3.3 there are two different types of failure monitoring available:

    • Blocking failure monitoring based on RMI (Default)
    • UDP based failure monitoring

    The failure monitoring can be configured through the following profile parameter:

    Parameter Description PC MC
    jade_core_NodeFailureMonitor_udp (*) If true, indicates that the UDP based failure monitoring has to be used. If false or not specified the default RMI based failure monitoring is activated. X X
    jade_core_NodeFailureMonitor_udp-port Specifies the port number where the main container will listen for UDP pings. The default value is 28000. (This parameter is only used in combination with (*) X X
    jade_core_NodeFailureMonitor_udp-ping-delay-limit Defines the maximum time (in milliseconds) the main container will wait for incoming ping messages. The default value is 3000. (This parameter is only used in combination with (*)   X
    jade_core_NodeFailureMonitor_udp-unreachable-limit Defines the maximum time (in milliseconds) a node can be temporarily unreachable until it gets removed from the platform. The default value is 10.000. (This parameter is only used in combination with (*)   X
    jade_core_NodeFailureMonitor_udp-ping-delay Defines the time interval (in milliseconds) in which a peripheral container sends UDP ping messages to the main container. The default value is 1.000. (This parameter is only used in combination with (*) X  

    MC ... main container PC ... peripheral container

    Author:
    Roland Mungenast - Profactor
    See Also:
    NodeEventListener
    • Constructor Detail

      • NodeFailureMonitor

        public NodeFailureMonitor()
    • Method Detail

      • start

        public void start​(Node n,
                          NodeEventListener nel)
        Start the monitoring
        Parameters:
        n - target node to monitor
        nel - listener to inform about new events
      • stop

        public abstract void stop()
        Stop the monitoring
      • addChild

        public void addChild​(Node n)
        Add a child node for monitoring.
        Parameters:
        n - child node
      • removeChild

        public void removeChild​(Node n)
        Remove a child node from monitoring
        Parameters:
        n - child node
      • getNode

        public Node getNode()
        Return the monitored target node
      • fireNodeAdded

        protected void fireNodeAdded()
        Fire a NODE ADDED event
      • fireNodeRemoved

        protected void fireNodeRemoved()
        Fire a NODE REMOVED event
      • fireNodeReachable

        protected void fireNodeReachable()
        Fire a NODE REACHABLE event
      • fireNodeUnreachable

        protected void fireNodeUnreachable()
        Fire a NODE UNREACHABLE event
      • requireService

        public String requireService()
      • getFailureMonitor

        public static NodeFailureMonitor getFailureMonitor()
        Factory method to create NodeFailureMonitor objects
        Returns:
        a new instance of a NodeFailureMonitor.