C API  19.3.0
Oracle NoSQL Database C Client
Proxy Configuration

Functions

kv_error_t kv_create_proxy_config (const char *kvproxy_path_to_jar, const char *kvclient_path_to_jar, kv_proxy_config_t **configp)
 Creates a proxy configuration handle to be used with kv_open_store_with_proxy(). More...
 
kv_error_t kv_proxy_config_set_iterator_max_results (kv_proxy_config_t *config, kv_long_t max_results_num)
 Sets the number of results returned by tableIterator or indexIterator in a single call to the server. The default value is 100. More...
 
kv_error_t kv_proxy_config_set_iterator_max_concurrent_requests (kv_proxy_config_t *config, kv_int_t max_concurrent_requests)
 Sets the maximum number of concurrent requests per iterator. Default value is the number of available processors * 2. More...
 
kv_error_t kv_proxy_config_set_iterator_max_results_batches (kv_proxy_config_t *config, kv_int_t max_results_batches)
 Sets the maximum number of results batches that can be held in the proxy per iterator. Default value is 0 that will be set automatically based on the max-concurrent-requests. More...
 
kv_error_t kv_proxy_config_set_iterator_expiration_timeout (kv_proxy_config_t *config, kv_timeout_t timeout_ms)
 Sets the expiration timeout for an iterator in milliseconds. The proxy maintains iterator state when an iteration begins. This timeout is used to expire that state if the client does not complete the iteration in a timely manner. The default value is 60000 (60 seconds). More...
 
kv_error_t kv_proxy_config_set_max_open_iterators (kv_proxy_config_t *config, kv_int_t max_opened_iterators)
 Sets the number for the maximum number of open iterators in a connection. Because the proxy maintains state for iterators an excessive number of active (not completed or timed out) iterators can result in memory problems. This method allows specification of a limit. The default value is 10000. More...
 
kv_error_t kv_proxy_config_set_num_threads (kv_proxy_config_t *config, kv_int_t num_threads)
 Sets the number of threads to use for request handling in the proxy server. The deault value is 20. More...
 
kv_error_t kv_proxy_config_set_request_limits (kv_proxy_config_t *config, kv_int_t max_active_requests, kv_int_t request_threshold_percent, kv_int_t node_limit_percent)
 Configures the maximum number of requests that this client can have active for a node in the KVStore. More...
 
kv_error_t kv_proxy_config_set_timeouts (kv_proxy_config_t *config, kv_timeout_t read_timeout, kv_timeout_t request_timeout, kv_timeout_t socket_open_timeout)
 Configures default timeout values. More...
 
kv_error_t kv_proxy_config_set_sec_prop_file (kv_proxy_config_t *config, const char *security_property_file)
 Sets the security property configuration file, the file is located on the proxy server. More...
 
kv_long_t kv_proxy_config_get_iterator_max_results (const kv_proxy_config_t *config)
 Returns the number of results returned by tableIterator or indexIterator in a single server call. More...
 
kv_int_t kv_proxy_config_get_iterator_max_concurrent_requests (const kv_proxy_config_t *config)
 Returns the maximum number of concurrent requests per iterator. More...
 
kv_int_t kv_proxy_config_get_iterator_max_results_batches (const kv_proxy_config_t *config)
 Returns the maximum number of results batches that can be held in the proxy per iterator. More...
 
kv_timeout_t kv_proxy_config_get_iterator_expiration_timeout (const kv_proxy_config_t *config)
 Returns the expiration timeout for an iterator in milliseconds. More...
 
kv_int_t kv_proxy_config_get_max_open_iterators (const kv_proxy_config_t *config)
 Returns the number for maximum number of active iterators on a connection. More...
 
kv_int_t kv_proxy_config_get_num_threads (const kv_proxy_config_t *config)
 Returns the number of request handler threads configured for the proxy. More...
 
void kv_proxy_config_get_request_limits (const kv_proxy_config_t *config, kv_int_t *max_active_requests, kv_int_t *request_threshold_percent, kv_int_t *node_limit_percent)
 Returns various request limits from the handle. More...
 
void kv_proxy_config_get_timeouts (const kv_proxy_config_t *config, kv_timeout_t *read_timeout, kv_timeout_t *request_timeout, kv_timeout_t *socket_open_timeout)
 Returns various timeout values from the handle. More...
 
const char * kv_proxy_config_get_sec_prop_file (const kv_proxy_config_t *config)
 Gets the security property file that located on the proxy server. More...
 
void kv_release_proxy_config (kv_proxy_config_t **configp)
 Releases the resources used by the proxy configuration handle. More...
 

Detailed Description

Function Documentation

kv_error_t kv_create_proxy_config ( const char *  kvproxy_path_to_jar,
const char *  kvclient_path_to_jar,
kv_proxy_config_t **  configp 
)

Creates a proxy configuration handle to be used with kv_open_store_with_proxy().

The kvproxy_path_to_jar and kvclient_path_to_jar information passed to this function are copied and stored in the proxy configuration handle.

Note
User should release the config handle using kv_release_proxy_config(), but only if the application encounters an error when kv_open_store_with_proxy() is called.
Parameters
[in]kvproxy_path_to_jarThe file path to kvproxy.jar.
[in]kvclient_path_to_jarThe file path to kvclient.jar.
[out]configpThe output proxy configuration handle.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_timeout_t kv_proxy_config_get_iterator_expiration_timeout ( const kv_proxy_config_t config)

Returns the expiration timeout for an iterator in milliseconds.

Parameters
[in]configThe proxy configuration handle.
Returns
The expiration timeout for an iterator in milliseconds.
kv_int_t kv_proxy_config_get_iterator_max_concurrent_requests ( const kv_proxy_config_t config)

Returns the maximum number of concurrent requests per iterator.

Parameters
[in]configThe proxy configuration handle.
Returns
The maximum number of concurrent requests per iterator.
kv_long_t kv_proxy_config_get_iterator_max_results ( const kv_proxy_config_t config)

Returns the number of results returned by tableIterator or indexIterator in a single server call.

Parameters
[in]configThe proxy configuration handle.
Returns
The number of results returned by tableIterator or indexIterator in one single call or 0 if not set.
kv_int_t kv_proxy_config_get_iterator_max_results_batches ( const kv_proxy_config_t config)

Returns the maximum number of results batches that can be held in the proxy per iterator.

Parameters
[in]configThe proxy configuration handle.
Returns
The maximum number of results batches that can be held in the proxy per iterator
kv_int_t kv_proxy_config_get_max_open_iterators ( const kv_proxy_config_t config)

Returns the number for maximum number of active iterators on a connection.

Parameters
[in]configThe proxy configuration handle.
Returns
The maximum number of active iterators allowed on a connection, or 0 if not set.
kv_int_t kv_proxy_config_get_num_threads ( const kv_proxy_config_t config)

Returns the number of request handler threads configured for the proxy.

Parameters
[in]configThe proxy configuration handle.
Returns
The number of request handler threads, or 0 if not set.
void kv_proxy_config_get_request_limits ( const kv_proxy_config_t config,
kv_int_t max_active_requests,
kv_int_t request_threshold_percent,
kv_int_t node_limit_percent 
)

Returns various request limits from the handle.

Parameters
[in]configThe proxy configuration handle.
[out]max_active_requestsor NULL if not set.
[out]request_threshold_percentor NULL if not set.
[out]node_limit_percentor NULL if not set.
const char* kv_proxy_config_get_sec_prop_file ( const kv_proxy_config_t config)

Gets the security property file that located on the proxy server.

Parameters
[in]configThe proxy configuration handle.
Returns
The path of security property file, or NULL if not set.
void kv_proxy_config_get_timeouts ( const kv_proxy_config_t config,
kv_timeout_t read_timeout,
kv_timeout_t request_timeout,
kv_timeout_t socket_open_timeout 
)

Returns various timeout values from the handle.

Parameters
[in]configThe proxy configuration handle.
[out]read_timeoutThe output read timeout value or NULL if not set.
[out]request_timeoutThe output request timeout value or NULL if not set.
[out]socket_open_timeoutThe output socket open timeout value or NULL if not set.
kv_error_t kv_proxy_config_set_iterator_expiration_timeout ( kv_proxy_config_t config,
kv_timeout_t  timeout_ms 
)

Sets the expiration timeout for an iterator in milliseconds. The proxy maintains iterator state when an iteration begins. This timeout is used to expire that state if the client does not complete the iteration in a timely manner. The default value is 60000 (60 seconds).

Parameters
[in]configThe proxy configuration handle.
[in]timeout_msThe expiration timeout in milliseconds.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_proxy_config_set_iterator_max_concurrent_requests ( kv_proxy_config_t config,
kv_int_t  max_concurrent_requests 
)

Sets the maximum number of concurrent requests per iterator. Default value is the number of available processors * 2.

Parameters
[in]configThe proxy configuration handle.
[in]max_concurrent_requestsThe maximum number of concurrent requests per iterator.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_proxy_config_set_iterator_max_results ( kv_proxy_config_t config,
kv_long_t  max_results_num 
)

Sets the number of results returned by tableIterator or indexIterator in a single call to the server. The default value is 100.

Parameters
[in]configThe proxy configuration handle.
[in]max_results_numThe number of results returned by tableIterator or indexIterator in a single server call.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_proxy_config_set_iterator_max_results_batches ( kv_proxy_config_t config,
kv_int_t  max_results_batches 
)

Sets the maximum number of results batches that can be held in the proxy per iterator. Default value is 0 that will be set automatically based on the max-concurrent-requests.

Parameters
[in]configThe proxy configuration handle.
[in]max_results_batchesThe maximum number of results batches.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_proxy_config_set_max_open_iterators ( kv_proxy_config_t config,
kv_int_t  max_opened_iterators 
)

Sets the number for the maximum number of open iterators in a connection. Because the proxy maintains state for iterators an excessive number of active (not completed or timed out) iterators can result in memory problems. This method allows specification of a limit. The default value is 10000.

Parameters
[in]configThe proxy configuration handle.
[in]max_opened_iteratorsThe maximum number of active iterators allowed for a given connection.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_proxy_config_set_num_threads ( kv_proxy_config_t config,
kv_int_t  num_threads 
)

Sets the number of threads to use for request handling in the proxy server. The deault value is 20.

Parameters
[in]configThe proxy configuration handle.
[in]num_threadsThe number of request handler threads to use in the proxy server.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_proxy_config_set_request_limits ( kv_proxy_config_t config,
kv_int_t  max_active_requests,
kv_int_t  request_threshold_percent,
kv_int_t  node_limit_percent 
)

Configures the maximum number of requests that this client can have active for a node in the KVStore.

Parameters
[in]configThe proxy configuration handle.
[in]max_active_requestsThe maximum number of active requests permitted by the KV client.
[in]request_threshold_percentThe threshold computed as a percentage of max_active_requests at which requests are limited.
[in]node_limit_percentThe maximum number of active requests that can be associated with a node when the request limiting mechanism is active.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_proxy_config_set_sec_prop_file ( kv_proxy_config_t config,
const char *  security_property_file 
)

Sets the security property configuration file, the file is located on the proxy server.

Parameters
[in]configThe proxy configuration handle.
[in]security_property_fileThe path of security property file that located on proxy server.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_proxy_config_set_timeouts ( kv_proxy_config_t config,
kv_timeout_t  read_timeout,
kv_timeout_t  request_timeout,
kv_timeout_t  socket_open_timeout 
)

Configures default timeout values.

Parameters
[in]configThe proxy configuration handle.
[in]read_timeoutThe read timeout associated with sockets used to make client requests.
[in]request_timeoutThe default request timeout.
[in]socket_open_timeoutThe amount of time the client will wait when opening a socket to the store.
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
void kv_release_proxy_config ( kv_proxy_config_t **  configp)

Releases the resources used by the proxy configuration handle.

Parameters
[in]configpA pointer to the proxy handle to release.