memcached_mget.3\
memcached_mget_by_key.3\
memcached_mget_execute.3 \
+ memcached_mget_execute_by_key.3 \
memcached_prepend.3\
memcached_prepend_by_key.3\
memcached_replace.3\
memcached_mget_execute.3: memcached_get.pod
${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_mget_execute.3
+memcached_mget_execute_by_key.3: memcached_get.pod
+ ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_mget_execute_by_key.3
+
memcached_fetch.3: memcached_get.pod
${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_fetch.3
=head1 NAME
-memcached_get, memcached_mget, memcached_fetch - Get a value
+memcached_get, memcached_mget, memcached_fetch, memcached_mget_execute,
+memcached_mget_execute_by_key - Get a value
=head1 LIBRARY
unsigned int number_of_callbacks);
- memcached_return
+ memcached_return
memcached_mget_execute(memcached_st *ptr,
- const char *master_key,
- size_t master_key_length,
const char * const *keys,
const size_t *key_length,
size_t number_of_keys,
void *context,
unsigned int number_of_callbacks);
+ memcached_return
+ memcached_mget_execute_by_key(memcached_st *ptr,
+ const char *master_key,
+ size_t master_key_length,
+ const char * const *keys,
+ const size_t *key_length,
+ size_t number_of_keys,
+ memcached_execute_function *callback,
+ void *context,
+ unsigned int number_of_callbacks);
+
=head1 DESCRIPTION
to each function call. In the future there will be an option to allow this
to be an array.
-memcached_mget_execute() is similar to memcached_mget(), but it may trigger
-the supplied callbacks with result sets while sending out the queries. If
-you try to perform a really large multiget with memcached_mget() you may
-encounter a deadlock in the OS kernel (we fail to write data to the socket
-because the input buffer is full). memcached_mget_execute() solves this
-problem by processing some of the results before continuing sending out
-requests. Please note that this function is only available in the binary
-protocol.
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
as memcached_get() and memcached_mget(). The difference is that they take
}
memcached_return memcached_mget_execute(memcached_st *ptr,
- const char *master_key,
- size_t master_key_length,
const char * const *keys,
const size_t *key_length,
size_t number_of_keys,
memcached_execute_function *callback,
void *context,
unsigned int number_of_callbacks)
+{
+ return memcached_mget_execute_by_key(ptr, NULL, 0, keys, key_length,
+ number_of_keys, callback,
+ context, number_of_callbacks);
+}
+
+memcached_return memcached_mget_execute_by_key(memcached_st *ptr,
+ const char *master_key,
+ size_t master_key_length,
+ const char * const *keys,
+ const size_t *key_length,
+ size_t number_of_keys,
+ memcached_execute_function *callback,
+ void *context,
+ unsigned int number_of_callbacks)
{
if ((ptr->flags & MEM_BINARY_PROTOCOL) == 0)
return MEMCACHED_NOT_SUPPORTED;
LIBMEMCACHED_API
memcached_return memcached_mget_execute(memcached_st *ptr,
- const char *master_key,
- size_t master_key_length,
const char * const *keys,
const size_t *key_length,
size_t number_of_keys,
void *context,
unsigned int number_of_callbacks);
+LIBMEMCACHED_API
+memcached_return memcached_mget_execute_by_key(memcached_st *ptr,
+ const char *master_key,
+ size_t master_key_length,
+ const char * const *keys,
+ const size_t *key_length,
+ size_t number_of_keys,
+ memcached_execute_function *callback,
+ void *context,
+ unsigned int number_of_callbacks);
+
#ifdef __cplusplus
}
#endif
/* Try to get all of them with a large multiget */
unsigned int counter= 0;
memcached_execute_function callbacks[1]= { [0]= &callback_counter };
- rc= memcached_mget_execute(memc, NULL, 0,
- (const char**)keys, key_length,
+ rc= memcached_mget_execute(memc, (const char**)keys, key_length,
(size_t)max_keys, callbacks, &counter, 1);
if (binary)