Couchbase C Client  2.5.6
cntl-private.h File Reference

Go to the source code of this file.

Data Structures

struct  lcb_cntl_rdballocfactory
 Structure being used because function pointers can't technically be cast to void*. More...
 
struct  lcb_cntl_server_t.v.v1
 Current information here. More...
 

Macros

#define LCB_CNTL_SERVER_COMMON_FIELDS
 
#define LCB_CNTL_MEMDNODE_INFO
 
#define LCB_CNTL_CONFIGNODE_INFO
 
#define LCB_CNTL_IOPS_DEFAULT_TYPES
 
#define LCB_CNTL_CONFIG_HTTP_NODES
 
#define LCB_CNTL_CONFIG_CCCP_NODES
 
#define LCB_CNTL_CONFIG_ALL_NODES
 
#define LCB_CNTL_REINIT_CONNSTR
 
#define LCB_CNTL_COMPRESSION_OPTS
 Control how the library handles compression and deflation to and from the server. More...
 
#define LCB_CNTL_RDBALLOCFACTORY
 
#define LCB_CNTL_IP6POLICY
 IPv4/IPv6 selection policy. More...
 
#define LCB_CNTL_VBGUESS_PERSIST
 Persist heuristic vbucket information across updates. More...
 
#define LCB_CNTL_UNSAFE_OPTIMIZE
 
#define LCB_CNTL_TCP_NODELAY
 
#define LCB_CNTL_KVTIMINGS
 

Typedefs

typedef struct rdb_ALLOCATOR *(* lcb_RDBALLOCFACTORY) (void)
 

Enumerations

enum  lcb_COMPRESSOPTS
 Options for how to handle compression. More...
 
enum  lcb_ipv6_t
 

Data Structure Documentation

struct lcb_cntl_rdballocfactory

Structure being used because function pointers can't technically be cast to void*.

Data Fields
lcb_RDBALLOCFACTORY factory
struct lcb_cntl_server_t.v.v1

Current information here.

Data Fields
LCB_CNTL_SERVER_COMMON_FIELDS
const char *
sasl_mech Chosen SASL mechanism.

Macro Definition Documentation

#define LCB_CNTL_COMPRESSION_OPTS

Control how the library handles compression and deflation to and from the server.

Stability
Committed:

Starting in Couchbase Server 3.0, compression can optionally be applied to incoming and outcoming data. For incoming (i.e. GET requests) the data may be received in compressed format and then allow the client to inflate the data upon receipt. For outgoing (i.e. SET requests) the data may be compressed on the client side and then be stored and recognized on the server itself.

The default behavior is to transparently handle compression for both incoming and outgoing data.

Note that if the lcb_STORECMDv0::datatype field is set with compression flags, the data will never be compressed by the library as this is an indication that it is already compressed.

Argument
ModesArg
Get, Setint* (value is one of lcb_COMPRESSOPTS)
#define LCB_CNTL_RDBALLOCFACTORY
Stability
Volatile:
Set the allocator factory used by libcouchbase. The allocator factory is a function invoked with no arguments which yields a new rdb_ALLOCATOR object. Currently the use and API of this object is considered internal and its API and header files are in src/rdb.
ModeArg
Set, Get lcb_cntl_rdballocfactory*
#define LCB_CNTL_IP6POLICY

IPv4/IPv6 selection policy.

Setting which controls whether hostname lookups should prefer IPv4 or IPv6

Argument
ModesArg
Get, Setlcb_ipv6_t*
Stability
Uncommitted:
#define LCB_CNTL_VBGUESS_PERSIST

Persist heuristic vbucket information across updates.

Stability
Volatile:

As of version 2.4.8 this option no longer has any effect, and vBucket heuristics are always retained for a maximum of 20 seconds.

Argument
ModesArg
Get, Setint*
#define LCB_CNTL_UNSAFE_OPTIMIZE
Stability
Volatile:
This is a collection of various options which sacrifice data safety for speed.
#define LCB_CNTL_TCP_NODELAY
Stability
Volatile:
Disable or enable Nagle's algorithm. The default is to disable it, as it will typically reduce latency. In general it is recommended not to touch this setting. It is here mainly for debugging.

Conventionally, the option to disable Nagle's algorithm is called "TCP_NODELAY", thus if this value is one, Nagle is off, and vice versa.

#define LCB_CNTL_KVTIMINGS
Stability
Volatile:
Get the lcb_HISTOGRAM object for key-value timings
Argument
ModesArg
Getlcb_HISTOGRAM**

Enumeration Type Documentation

Options for how to handle compression.

Enumerator
LCB_COMPRESS_NONE 

Do not perform compression in any direction.

Data which is received compressed via the server will be indicated as such by having the LCB_VALUE_F_SNAPPYCOMP flag set in the lcb_GETRESPv0::datatype field

LCB_COMPRESS_IN 

Decompress incoming data, if the data has been compressed at the server.

If this is set, the datatype field in responses will always be stripped of the LCB_VALUE_F_SNAPPYCOMP flag.

LCB_COMPRESS_OUT 

Compress outgoing data.

Note that if the datatype field contains the LCB_VALUE_F_SNAPPYCOMP flag, then the data will never be compressed as it is assumed that it is already compressed.

LCB_COMPRESS_FORCE 

By default the library will send a HELLO command to the server to determine whether compression is supported or not.

Because commands may be pipelined prior to the scheduing of the HELLO command it is possible that the first few commands may not be compressed when schedule due to the library not yet having negotiated settings with the server. Setting this flag will force the client to assume that all servers support compression despite a HELLO not having been intially negotiated.