Store Operations Data Types

This section defines data types that are by the store or API at a high level, or data types that are commonly used by all areas of the API.

kv_api_type_enum

typedef enum {
    KV_JNI
} kv_api_type_enum;

Structure used to describe the API implementation type. Currently only one option is available: KV_JNI.

kv_error_t

typedef enum {
    KV_SUCCESS = 0,
    KV_NO_MEMORY = -1,
    KV_NOT_IMPLEMENTED = -2,
    KV_ERROR_JVM = -3,
    KV_KEY_NOT_FOUND = -4,
    KV_KEY_EXISTS = -5,
    KV_NO_SUCH_VERSION = -6,
    KV_NO_SUCH_OBJECT = -7,
    KV_INVALID_OPERATION = -8,
    KV_INVALID_ARGUMENT = -9,
    KV_TIMEOUT = -10,
    KV_CONSISTENCY = -11,
    KV_DURABILITY = -12,
    KV_FAULT = -13,
    KV_AUTH_FAILURE = -15,
    KV_AUTH_REQUIRED = -16,
    KV_ACCESS_DENIED = -17,
    KV_ERROR_JAVA_UNKNOWN = -99,
    KV_ERROR_UNKNOWN = -100
} kv_error_t 

#define KV_FALSE 0
#define KV_TRUE 1 

All non-void API methods return kv_error_t. With few exceptions a return value of KV_SUCCESS (or 0) means no error and a negative value means an error.

The exceptions are the methods that return integer values. In these cases a negative return means an error and a non-negative return is the correct value.

kv_store_iterator_config_t

typedef struct {
   kv_int_t max_conc_req;
   kv_int_t max_res_batches;
} kv_store_iterator_config_t;

Used to configure a parallel scan of the store.

max_conc_req identifies the maximum number of concurrent requests the parallel scan will make. That is, this is the maximum number of client-side threads that are used to perform this scan. Setting this value to 1 causes the store iteration to be performed using only the current thread. Setting it to 0 lets the KV Client determine the number of threads based on topology information (up to a maximum of the number of available processors). Values less than 0 are reserved for some future use and cause an error to be returned.

max_res_batches specifies the maximum number of results batches that can be held in the Oracle NoSQL Database client process before processing on the Replication Node pauses. This ensures that client side memory is not exceeded if the client cannot consume results as fast as they are generated by the Replication Nodes. The default value is the value specified for max_conc_req.