Hitachi

In-Memory Data Grid Hitachi Elastic Application Data Store


20.1.9 ead_put_all() (stores keys and values by using a batch operation)

Organization of this subsection

(1) Description

Using a batch operation, this function stores multiple keys and values in cache.

An array of the ead_key_value_pair structure is specified in the argument and each key is associated with a value and then is stored in cache.

If the same key is specified multiple times, it is processed multiple times in the order specified.

(2) Format

#include <eads.h>
ead_put_all_results ead_put_all
(
  const EAD_CACHE              *cp,                 /* In */
  size_t                       array_length,        /* In */
  const ead_key_value_pair     *key_value_array,    /* In */
  int                          *error_code          /* Out */
);

(3) Arguments

cp

Specifies the handle (pointer) to the cache where the keys and values are to be stored.

Specify the handle (pointer) obtained from ead_start_cache() when access to the cache was started.

array_length

Specifies the number of array elements of the ead_key_value_pair structure to be stored.

For details about the ead_key_value_pair structure and its format, see 20.1.40 ead_key_value_pair structure (key-value pairs).

key_value_array

Specifies the pointer to the top of the array of the ead_key_value_pair structure to be stored.

For details about the ead_key_value_pair structure and its format, see 20.1.40 ead_key_value_pair structure (key-value pairs).

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_put_all_results structure) of storing keys and values.

For details about the ead_put_all_results structure and its format, see 20.1.43 ead_put_all_results structure (execution results of ead_put_all()).

(5) Notes