#include <libmemcached/memcached_pool.h>
memcached_pool_st *
memcached_pool_create(memcached_st* mmc, int initial, int max);
memcached_st *
memcached_pool_destroy(memcached_pool_st* pool);
memcached_st *
memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
memcached_return_t
memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
memcached_st *memcached_create (memcached_st *ptr);
memcached_return_t
memcached_pool_behavior_set(memcached_pool_st *pool,
memcached_behavior_t flag,
uint64_t data)
memcached_return_t
memcached_pool_behavior_get(memcached_pool_st *pool,
memcached_behavior_t flag,
uint64_t *value)
memcached_pool_destroy() is used to destroy the connection pool created with memcached_pool_create() and release all allocated resources. It will return the pointer to the "memcached_st" structure passed as an argument to memcached_pool_create(), and returns the ownership of the pointer to the caller.
memcached_pool_pop() is used to grab a connection structure from the connection pool. The block argument specifies if the function should block and wait for a connection structure to be available if we try to exceed the maximum size.
memcached_pool_push() is used to return a connection structure back to the pool.
memcached_pool_behavior_set() and memcached_pool_behagior_get() is used to get/set behavior flags on all connections in the pool.
memcached_pool_destroy() returns the pointer (and ownership) to the memcached_st structure used to create the pool. If connections are in use it returns NULL.
memcached_pool_pop() returns a pointer to a memcached_st structure from the pool (or NULL if an allocation cannot be satisfied).
memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
memcached_pool_behavior_get() and memcached_pool_behavior_get() returns MEMCACHED_SUCCESS upon success.