20.1.15 ead_get_group() (acquires values by using a batch operation with group specification)
- Organization of this subsection
(1) Description
Using a batch operation, this function acquires the values associated with keys that belong to a specified group and its lower hierarchy groups.
(2) Format
#include <eads.h> ead_get_group_results ead_get_group ( const EAD_CACHE *cp, /* In */ const char *group_name, /* In */ int *error_code /* Out */ );
(3) Arguments
- cp
-
Specifies the handle (pointer) to the cache where the values to be acquired are stored.
Specify the handle (pointer) obtained from ead_start_cache() when access to the cache was started.
- group_name
-
Specifies the group name of the group for which values are to be acquired.
For details about the data that can be specified, see 15.2.2(2) Data that can be specified as group names.
- error_code
-
Specifies the pointer from which to retrieve the error code.
For details about error codes, see 20.2 Error codes in the client library (C).
(4) Return value
Using a batch operation, this function returns the results (ead_get_group_results structure) of acquiring the values associated with keys that belong to the specified group and its lower hierarchy groups.
-
If the batch acquisition processing was partially or entirely successful
The key_value_array contains as many keys as there are values successfully acquired and the values that correspond to the list of keys specified in the argument.
-
If the batch acquisition processing failed entirely
A numeric-type member of the ead_get_group_results structure contains 0, and a pointer-type member contains NULL.
For details about the ead_get_group_results structure and its format, see 20.1.45 ead_get_group_results structure (execution results of ead_get_group()).
(5) Notes
-
The memory area for storing the results of batch acquisition of values that is returned as the return value is not freed automatically. You must free it in the application program. For details, see 19.1.1(10) Freeing a memory area returned as a return value.
-
If the cache operation fails partially, check the cache operation results, and then re-execute the function, if necessary.
-
Because caches are not locked while operations are ongoing, a target value might be changed by another cache operation during batch operation.
-
When batch operations are performed on a large amount of data, a large amount of memory might be required by EADS clients and EADS servers.
-
When batch operations are performed on a large amount of data, it might take a long time to complete the processing. To ensure proper operation, make sure that you design a timeout value that is appropriate for the processing time.