Couchbase C Client  2.4.4
Miscellaneous memcached commands

Detailed Description

Functions

lcb_error_t lcb_server_versions (lcb_t instance, const void *command_cookie, lcb_SIZE num, const lcb_server_version_cmd_t *const *commands)
 Request server versions. More...
 
lcb_version_callback lcb_set_version_callback (lcb_t, lcb_version_callback)
 
lcb_error_t lcb_set_verbosity (lcb_t instance, const void *command_cookie, lcb_SIZE num, const lcb_verbosity_cmd_t *const *commands)
 Set the loglevel on the servers. More...
 
lcb_verbosity_callback lcb_set_verbosity_callback (lcb_t, lcb_verbosity_callback)
 
lcb_error_t lcb_flush (lcb_t instance, const void *cookie, lcb_SIZE num, const lcb_flush_cmd_t *const *commands)
 Flush the entire couchbase cluster! More...
 
lcb_flush_callback lcb_set_flush_callback (lcb_t, lcb_flush_callback)
 

Typedefs

typedef void(* lcb_version_callback )(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_server_version_resp_t *resp)
 The callback function for a version request. More...
 
typedef void(* lcb_verbosity_callback )(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_verbosity_resp_t *resp)
 The callback function for a verbosity command. More...
 
typedef void(* lcb_flush_callback )(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_flush_resp_t *resp)
 The callback function for a flush request. More...
 

Enumerations

enum  lcb_verbosity_level_t
 level field for lcb_set_verbosity() More...
 

Function Documentation

lcb_error_t lcb_server_versions ( lcb_t  instance,
const void *  command_cookie,
lcb_SIZE  num,
const lcb_server_version_cmd_t *const *  commands 
)

Request server versions.

The callback will be invoked with the instance, server address, version string, and version string length.

When all server versions have been received, the callback is invoked with the server endpoint argument set to NULL

lcb_server_version_cmd_t *cmd = calloc(1, sizeof(*cmd));
cmd->version = 0;
lcb_server_version_cmd_t* commands[] = { cmd };
lcb_server_versions(instance, NULL, 1, commands);
Parameters
instancethe instance used to batch the requests from
command_cookiea cookie passed to all of the notifications from this command
numthe total number of elements in the commands array
commandsthe array containing the version commands
Returns
The status of the operation
Attention
The name of this function may be slightly misleading. This does not retrieve the Couchbase Server version, but only the version of its memcached component. See lcb_server_stats() for a way to retrieve the server version
Stability
Committed:
lcb_error_t lcb_set_verbosity ( lcb_t  instance,
const void *  command_cookie,
lcb_SIZE  num,
const lcb_verbosity_cmd_t *const *  commands 
)

Set the loglevel on the servers.

lcb_verbosity_cmd_t *cmd = calloc(1, sizeof(*cmd));
cmd->version = 0;
cmd->v.v0.level = LCB_VERBOSITY_WARNING;
lcb_verbosity_cmd_t* commands[] = { cmd };
lcb_set_verbosity(instance, NULL, 1, commands);
Parameters
instancethe instance used to batch the requests from
command_cookieA cookie passed to all of the notifications from this command
numthe total number of elements in the commands array
commandsthe array containing the verbosity commands
Returns
The status of the operation.
lcb_error_t lcb_flush ( lcb_t  instance,
const void *  cookie,
lcb_SIZE  num,
const lcb_flush_cmd_t *const *  commands 
)

Flush the entire couchbase cluster!

lcb_flush_cmd_t *cmd = calloc(1, sizeof(*cmd));
cmd->version = 0;
lcb_flush_cmd_t* commands[] = { cmd };
lcb_flush(instance, NULL, 1, commands);
Parameters
instancethe instance used to batch the requests from
cookieA cookie passed to all of the notifications from this command
numthe total number of elements in the commands array
commandsthe array containing the flush commands
Returns
The status of the operation.
Stability
Committed:

Data Structure Documentation

struct lcb_server_version_resp_t

Response structure for lcb_server_versions()

Data Fields
int version
union lcb_server_version_resp_t v

Typedef Documentation

typedef void(* lcb_version_callback)(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_server_version_resp_t *resp)

The callback function for a version request.

Parameters
instancethe instance performing the operation
cookiethe cookie associated with with the command
errorThe status of the operation
respresponse data
typedef void(* lcb_verbosity_callback)(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_verbosity_resp_t *resp)

The callback function for a verbosity command.

Parameters
instancethe instance performing the operation
cookiethe cookie associated with with the command
errorThe status of the operation
respresponse data
typedef void(* lcb_flush_callback)(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_flush_resp_t *resp)

The callback function for a flush request.

Parameters
instancethe instance performing the operation
cookiethe cookie associated with with the command
errorThe status of the operation
respResponse data

Enumeration Type Documentation

level field for lcb_set_verbosity()

Enumerator
LCB_VERBOSITY_DETAIL 

This is the most verbose level and generates a lot of output on the server.

Using this level will impact the cluster's performance

LCB_VERBOSITY_DEBUG 

This level generates a lot of output.

Using this level will impact the cluster's performance

LCB_VERBOSITY_INFO 

This level traces all commands and generates a fair amount of output.

Depend on the workload it may slow down the system a little bit

LCB_VERBOSITY_WARNING 

This is the default level and only errors and warnings will be logged.