Fix for lp:962815, from https://launchpad.net/~harebox
[awesomized/libmemcached] / memcached / items.h
1 /* See items.c */
2 uint64_t get_cas_id(void);
3
4 /*@null@*/
5 item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_time_t exptime, const int nbytes);
6 void item_free(item *it);
7 bool item_size_ok(const size_t nkey, const int flags, const int nbytes);
8
9 int do_item_link(item *it, const uint32_t hv); /** may fail if transgresses limits */
10 void do_item_unlink(item *it, const uint32_t hv);
11 void do_item_unlink_nolock(item *it, const uint32_t hv);
12 void do_item_remove(item *it);
13 void do_item_update(item *it); /** update LRU time to current and reposition */
14 int do_item_replace(item *it, item *new_it, const uint32_t hv);
15
16 /*@null@*/
17 char *do_item_cachedump(const unsigned int slabs_clsid, const unsigned int limit, unsigned int *bytes);
18 void do_item_stats(ADD_STAT add_stats, void *c);
19 /*@null@*/
20 void do_item_stats_sizes(ADD_STAT add_stats, void *c);
21 void do_item_flush_expired(void);
22
23 item *do_item_get(const char *key, const size_t nkey, const uint32_t hv);
24 item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv);
25 void item_stats_reset(void);
26 extern pthread_mutex_t cache_lock;
27 void item_stats_evictions(uint64_t *evicted);