Interface NodeMonitoring


public interface NodeMonitoring
Listener interface that runs on a replica node to perform specific actions when the replica status switches to the states 'Available' or 'Unavailable'.

Using node monitoring

  1. Create a class that implements this interface. This class must not be in an EBX® module and must be accessible from the class-loader of ebx.jar.
  2. Go to 'Administration > [D3] Replica configuration' in the user interface and set the full class name in the field /root/slave/monitoringClass.
  3. Click outside the text field to run class validation. If nothing happens, the validation has succeeded. Otherwise, an error message is displayed.

See Replica node monitoring through the Java API for more information.

Since:
5.4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is triggered when the replica node's status changes to 'Unavailable'.
    void
    This method is triggered when the replica node's status changes to 'Available'.
  • Method Details

    • handleWhenUp

      void handleWhenUp(NodeMonitoringContext aContext)
      This method is triggered when the replica node's status changes to 'Available'. This happens when the initialization operation succeeds.

      If the execution of this method throws an exception, its stack trace will be added to the D3 logger and the error will have no other impact.

    • handleWhenDown

      void handleWhenDown(NodeMonitoringContext aContext)
      This method is triggered when the replica node's status changes to 'Unavailable'. This happens when:
      • The replica receives a deactivation request from the primary node.
      • The replica node shuts down.
      • The replica administrator launches the Unregister service from the user interface under '[D3] Replica configuration'.

      If the execution of this method throws an exception, its stack trace will be added to the D3 logger and the error will have no other impact.