kv_lob_get_for_read()

#include <kvstore.h>

kv_error_t 
kv_lob_get_for_read(kv_store_t *store,
                    const kv_key_t *key,
                    kv_lob_handle_t **handle,
                    kv_consistency_t *consistency,
                    kv_timeout_t timeout_ms); 

Allocates and configures a LOB handle for reading a Large Object from the store. If the handle is successfully created, KV_SUCCESS is returned; otherwise, KV_NO_MEMORY.

Upon opening this handle, you perform the actual read operation using kv_lob_read().

The LOB handle allocated by this function must be released using kv_lob_release_handle().

Parameters

  • store

    The store parameter is the handle to the store from which you want to read the LOB record.

  • key

    The key parameter is the LOB record's key. Note that the final path component used here must specify the LOB suffix configured for the store, or the read operation will fail. The LOB suffix is configured for your store using kv_config_set_lob_suffix().

  • handle

    The handle parameter references memory into which a pointer to the allocated LOB handle (structure) is copied.

  • consistency

    The consistency parameter is the consistency policy you want to use with this read 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.