The Sun Cluster framework uses a callback mechanism to provide communication between a data service and the RGM. The framework defines a set of callback methods, including their arguments and return values, and the circumstances under which the RGM calls each method.
You create a data service by coding a set of individual callback methods and implementing each method as a control program callable by the RGM. That is, the data service does not consist of a single executable but rather consists of a number of executable scripts (ksh) or binaries (C), each of which is directly callable by the RGM.
Callback methods are registered with the RGM through the resource type registration (RTR) file. In the RTR file you identify the program for each method you have implemented for the data service. When a system administrator registers the data service on a cluster, the RGM reads the RTR file, which provides, among other information, the identity of the callback programs.
The only required callback methods for a resource type are a start method (Start or Prenet_start), and a stop method (Stop or Postnet_stop).
Control and initialization methods
Start and Stop start and stop resources in a group that is being brought online or offline.
Init, Fini, Boot execute initialization and termination code on resources.
Administrative support methods
Validate verifies properties set by administrative action.
Update updates the property settings of an online resource.
Prenet_start and Postnet_stop do special startup or shutdown actions before network addresses in the same resource group are configured up or after they are configured down.
Monitor control methods
Monitor_start and Monitor_stop start or stop the monitor for a resource.
Monitor_check assesses the reliability of a node before a resource group is moved to the node.
See Chapter 4, Resource Management API Reference and the rt_callbacks(1HA) man page for more information on the callback methods. Also see Chapter 5, Sample Data Service and Chapter 8, Sample DSDL Resource Type Implementation for callback methods in sample data services.