To use the api for storing name-value records, Using returned name-value records, To use returned name-value records – Sun Microsystems Sun StorageTek 5800 User Manual
Page 64
▼
To Use the API for Storing Name-Value Records
Call hc_init once per process.
Call
“hc_session_create_ez”on page 53
to initialize the session and download the schema.
Create the metadata record with
Fill the new metadata piece by piece with hc_nvr_add_metadata_* functions (see
) for each 5800 system type.
Call either
“hc_store_metadata_ez”on page 88
or
to store
the new metadata record.
When you are done, free the metadata record by calling
When the session is finished, call
to free the session data
structures.
When all threads are completed, call hc_cleanup to release the global session.
Using Returned Name-Value Records
Name-value records are also returned as the result of queries that return metadata information,
such as
“hc_retrieve_metadata_ez” on page 92
▼
To Use Returned Name-Value Records
Run the query to create an
record or a table of
structures.
Use either name-based access (for example, hc_nvr_get_*) or index-based access (for example,
and
“hc_nvr_get_value_at_index” on page 77
To free the
structure, call
Note –
Structures created by hc_nvr_create can also be freed by calling hc_nvr_free.
1
2
3
4
5
6
7
8
1
2
Synchronous C API Functions
Sun StorageTek 5800 System Client API Reference Manual • June 2008
64