| |
The DSDL provides a set of convenience functions to retrieve values
of commonly used resource properties, resource group properties, resource
type properties, and extension properties. Retrieve user-defined extension
properties with scds_get_ext_property().
All convenience functions use the following conventions:
- The functions take only the handle
argument.
- Each function corresponds to a particular property.
- The return value type of the function matches the type of
the property value it retrieves.
- These functions do not return errors because the return values
have been pre-computed in scds_initialize(3HA).
For functions that return pointers, a NULL
value is returned when an error condition is encountered, for example, when scds_initialize() was not previously called
- If a new value for a property has been specified in the command
line arguments passed to the calling program (argv[]),
then this value is returned. Otherwise, these functions return the value retrieved
from the RGM.
- Some of these convenience functions return a pointer to memory
belonging to the DSDL. Do not modify this memory. A call to scds_close(3HA)
invalidates this pointer.
See the r_properties(5), rg_properties(5), and rt_properties(5),
man pages for descriptions of standard properties. See the individual data
service man pages for descriptions of extension properties.
See the scha_calls(3HA)
man page and the <scha_types.h> header
file for information about the data types used by these functions, such as scha_prop_type_t, scha_extprop_value_t, scha_initnodes_flag_t, scha_str_array_t, scha_failover_mode_t, scha_switch_t, and scha_rsstatus_t.
These functions use the following naming conventions:
- Property to Retrieve
- Function Name
- Resource property
-
scds_get_rs_<property-name>
- Resource group property
-
scds_get_rg_<property-name>
- Resource type property
-
scds_get_rt_<property-name>
- Commonly used extension property
-
scds_get_ext_<property-name>
The recognition of property names is case insensitive.
Resource Specific Functions
| |
The function declaration return values for the resource property to
retrieve. Some of the properties' values are explicitly set either in the
RTR file or by a scrgadm(1M) command.
Others are determined dynamically by the RGM. The functions return data types
appropriate for the requested property.
- Resource Property to Retrieve
- Function
Declaration
-
Cheap_probe_interval
-
int scds_get_rs_cheap_probe_interval(scds_handle_t handle)
-
Failover_mode
-
scha_failover_mode_t scds_get_rs_failover_mode(scds_handle_t handle)
-
Monitor_stop_timeout
-
int scds_get_rs_monitor_stop_timeout(scds_handle_t handle)
-
Monitored_switch
-
scha_switch_t scds_get_rs_monitored_switch(scds_handle_t handle)
-
On_off_switch
-
scha_switch_t scds_get_rs_on_off_switch(scds_handle_t handle)
-
Resource_dependencies
-
const scha_str_array_t * scds_get_rs_resource_dependencies(scds_handle_t
handle)
-
Resource_dependencies_weak
-
const scha_str_array_t * scds_get_rs_resource_dependencies_weak(scds_handle_t
handle)
-
Retry_count
-
int scds_get_rs_retry_count(scds_handle_t handle)
-
Retry_interval
-
int scds_get_rs_retry_interval(scds_handle_t handle)
-
Start_timeout
-
int scds_get_rs_start_timeout(scds_handle_t handle)
-
Stop_timeout
-
int scds_get_rs_stop_timeout(scds_handle_t handle)
-
Scalable
-
boolean scds_get_rs_scalable(scds_handle_t handle)
-
Thorough_probe_interval
-
scds_get_ext_<property-name>
|
Resource Group Specific Functions
| |
The function declaration return values for the resource group property
to Rretrieve. Some of the properties' values are explicitly set either in
the RTR file or by a scrgadm(1M) command.
Others are determined dynamically by the RGM. The functions return data types
appropriate for the requested property.
- Resource Group Property to Retrieve
- Function Declaration
-
Desired_primaries
-
int scds_get_rg_desired_primaries(scds_handle_t handle)
-
Global_resources_used
-
const scha_str_array_t * scds_get_rg_global_resources_used(scds_handle_t
handle)
-
Implicit_network_dependencies
-
boolean_t scds_get_rg_implicit_network_dependencies(scds_handle_t
handle)
-
Maximum_primaries
-
int scds_get_rg_maximum_primaries(scds_handle_t handle)
-
Nodelist
-
const scha_str_array_t * scds_get_rg_nodelist (scds_handle_t handle)
-
Pathprefix
-
const char * scds_get_rg_pathprefix(scds_handle_t handle)
-
Resource_dependencies_weak
-
const scha_str_array_t * scds_get_rg_resource_dependencies_weak(scds_handle_t
handle)
-
Pingpong_interval
-
int scds_get_rg_pingpong_interval(scds_handle_t handle)
-
Resource_list
-
const scha_str_array_t * scds_get_rg_resource_list(scds_handle_t handle)
-
RG_mode
-
scha_rgmode_t scds_get_rg_rg_mode(scds_handle_t handle)
|
Resource Type Specific Functions
| |
The function declaration return values for the Rresource type property
to retrieve. Some of the properties' values are explicitly set either in the
RTR file or by a scrgadm(1M) command.
Others are determined dynamically by the RGM. The functions return data types
appropriate for the requested property.
- Resource Type Property to Retrieve
- Function Declaration
-
API_version
-
int scds_get_rt_api_version(scds_handle_t handle)
-
RT_basedir
-
const char * scds_get_rt_global_rt_basedir(scds_handle_t handle)
-
Failover
-
boolean_t scds_get_rt_implicit_failover(scds_handle_t handle)
-
Init_nodes
-
scha_initnodes_flag_t scds_get_rt_init_nodes(scds_handle_t handle)
-
Installed_nodes
-
const scha_str_array_t * scds_get_rt_installed_nodes(scds_handle_t handle)
-
Single_instance
-
boolean_t scds_get_rt_single_instance(scds_handle_t handle)
-
Start method
-
const char * scds_get_rt_start_method(scds_handle_t handle)
-
Stop method
-
const char * scds_get_rt_stop_method(scds_handle_t handle)
-
RT_version
-
const char * scds_get_rt_rt_version(scds_handle_t handle)
|
Extension Property Specific Functions
| |
The function declaration return values for the resource extension property
to retrieve. Some of the properties' values are explicitly set either in the
RTR file or by a scrgadm(1M) command.
The functions return data types appropriate for the requested property.
A resource type can define extension properties beyond the four listed
in the table, but these four properties have convenience functions defined
for them. You retrieve these properties with these convenience functions or
with the scds_get_ext_property() function. You must use scds_get_ext_property() to retrieve extension properties other than
these four.
- Extension Property to Retrieve
- Function Declaration
-
Confdir_list
-
scha_str_array_t scds_get_ext_confdir_list(scds_handle_t handle)
-
Monitor_retry_count
-
int scds_get_ext_monitor_retry_count(scds_handle_t handle)
-
Monitor_retry_interval
-
int scds_get_ext_monitor_retry_interval(scds_handle_t handle)
-
Probe_timeout
-
int scds_get_ext_probe_timeout(scds_handle_t handle)
|
|