return memcached_strerror(NULL, rc);
}
+
+ bool setBehavior(memcached_behavior flag, uint64_t data) {
+ memcached_return rc;
+ rc= memcached_behavior_set(&memc, flag, data);
+ return (rc == MEMCACHED_SUCCESS);
+ }
+
+ uint64_t getBehavior(memcached_behavior flag) {
+ return memcached_behavior_get(&memc, flag);
+ }
+
/**
* Return the string which contains the list of memcached servers being
* used.
key.assign(ret_key);
free(value);
}
+ else if (value)
+ {
+ free(value);
+ }
+
return rc;
}
return version;
}
+ /**
+ * Retrieve memcached statistics. Populate a std::map with the retrieved
+ * stats. Each server will map to another std::map of the key:value stats.
+ *
+ * @param[out] stats_map a std::map to be populated with the memcached
+ * stats
+ * @return true on success; false otherwise
+ */
bool getStats(std::map< std::string, std::map<std::string, std::string> >
&stats_map)
{