kv_get_with_options()

#include <kvstore.h>

kv_error_t 
kv_get_with_options(kv_store_t *store,
                    const kv_key_t *key,
                    kv_value_t **valuep,
                    kv_consistency_t *consistency,
                    kv_timeout_t timeout_ms) 

Get the value associated with the key. This function allows you to use a non-default consistency policy and timeout value.

Parameters

  • store

    The store parameter is the handle to the store from which you want to retrieve the value.

  • key

    The key parameter is the key you want to use to look up the key/value pair.

  • valuep

    The valuep parameter references memory into which is copied the value portion of the retrieved record. Release the resources used by this structure using kv_release_value().

  • consistency

    The consistency parameter is the consistency policy you want to use with this operation. You create the consistency policy using kv_create_simple_consistency()kv_create_time_consistency() orkv_create_version_consistency().

    If NULL, the store's default consistency policy is used.

  • timeout_ms

    The timeout_ms parameter identifies the upper bound on the time interval, in milliseconds, for processing the get operation. A best effort is made not to exceed the specified limit. If zero, the default request timeout is used.