Name

lcb_get_num_replicas — Get the number of replicas in the cluster

Synopsis

cc [ flag … ] file… -lcouchbase [ library … ]

#include <libcouchbase/couchbase.h>
lcb_int32_t lcb_get_num_replicas(lcb_t instance);

DESCRIPTION

lcb_get_num_replicas() returns the number of replicas the bucket is configured to use.

EXAMPLES

#include <libcouchbase/couchbase.h>
...
lcb_t instance;
...
fprintf(stdout, "The bucket is using %d replicas\n",
        lcb_get_num_replicas(instance));
...

ATTRIBUTES

See lcb_attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE

Interface Stability

Committed

MT-Level

MT-Safe

COPYRIGHT

Copyright 2010-2013 Couchbase, Inc.

SEE ALSO

Learn more at http://www.couchbase.com/communities/c.

libcouchbase(3lib), lcb_create(3couchbase), lcb_get_num_nodes(3couchbase), lcb_attributes(5)