+
+ bool setBehavior(memcached_behavior_t flag, uint64_t data)
+ {
+ return (memcached_success(memcached_behavior_set(memc, flag, data)));
+ }
+
+ uint64_t getBehavior(memcached_behavior_t flag)
+ {
+ return memcached_behavior_get(memc, flag);
+ }
+
+ /**
+ * Configure the memcache object
+ *
+ * @param[in] in_config configuration
+ * @return true on success; false otherwise
+ */
+ bool configure(const std::string &configuration)
+ {
+ return (memcached_success(memcached_parse_configuration(memc, configuration.c_str(), configuration.size())));
+ }
+
+ /**
+ * Add a server to the list of memcached servers to use.
+ *
+ * @param[in] server_name name of the server to add
+ * @param[in] port port number of server to add
+ * @return true on success; false otherwise
+ */
+ bool addServer(const std::string &server_name, in_port_t port)
+ {
+ memcached_return_t rc;
+
+ rc= memcached_server_add(memc, server_name.c_str(), port);
+
+ return (rc == MEMCACHED_SUCCESS);
+ }
+
+ /**
+ * Remove a server from the list of memcached servers to use.
+ *
+ * @param[in] server_name name of the server to remove
+ * @param[in] port port number of server to remove
+ * @return true on success; false otherwise
+ */
+ bool removeServer(const std::string &server_name, in_port_t port)
+ {
+ std::string tmp_str;
+ std::ostringstream strstm;
+ tmp_str.append(",");
+ tmp_str.append(server_name);
+ tmp_str.append(":");
+ strstm << port;
+ tmp_str.append(strstm.str());
+
+ //memcached_return_t rc= memcached_server_remove(server);
+
+ return false;
+ }
+