semver: 1.0 -> 1
[m6w6/libmemcached] / include / libmemcachedutil-1 / pool.h
1 /*
2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
14 */
15
16 #pragma once
17
18 #include "libmemcached-1/memcached.h"
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 struct memcached_pool_st;
25 typedef struct memcached_pool_st memcached_pool_st;
26
27 LIBMEMCACHED_API
28 memcached_pool_st *memcached_pool_create(memcached_st *mmc, uint32_t initial, uint32_t max);
29
30 LIBMEMCACHED_API
31 memcached_pool_st *memcached_pool(const char *option_string, size_t option_string_length);
32
33 LIBMEMCACHED_API
34 memcached_st *memcached_pool_destroy(memcached_pool_st *pool);
35
36 LIBMEMCACHED_API
37 memcached_st *memcached_pool_pop(memcached_pool_st *pool, bool block, memcached_return_t *rc);
38 LIBMEMCACHED_API
39 memcached_return_t memcached_pool_push(memcached_pool_st *pool, memcached_st *mmc);
40 LIBMEMCACHED_API
41 memcached_return_t memcached_pool_release(memcached_pool_st *pool, memcached_st *mmc);
42
43 LIBMEMCACHED_API
44 memcached_st *memcached_pool_fetch(memcached_pool_st *, struct timespec *relative_time,
45 memcached_return_t *rc);
46
47 LIBMEMCACHED_API
48 memcached_return_t memcached_pool_behavior_set(memcached_pool_st *ptr, memcached_behavior_t flag,
49 uint64_t data);
50 LIBMEMCACHED_API
51 memcached_return_t memcached_pool_behavior_get(memcached_pool_st *ptr, memcached_behavior_t flag,
52 uint64_t *value);
53
54 #ifdef __cplusplus
55 } // extern "C"
56 #endif