xref: /memcached-1.4.29/items.h (revision 74e80c7b)
1 /* See items.c */
2 void item_init(void);
3 uint64_t get_cas_id(void);
4 
5 /*@null@*/
6 item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_time_t exptime, const int nbytes);
7 void item_free(item *it);
8 bool item_size_ok(const size_t nkey, const int flags, const int nbytes);
9 
10 int  do_item_link(item *it);     /** may fail if transgresses limits */
11 void do_item_unlink(item *it);
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);
15 
16 /*@null@*/
17 char *do_item_cachedump(const unsigned int slabs_clsid, const unsigned int limit, unsigned int *bytes);
18 char *do_item_stats(uint32_t (*add_stats)(char *buf, const char *key,
19                     const uint16_t klen, const char *val,
20                     const uint32_t vlen, void *cookie), void *c, int *bytes);
21 /*@null@*/
22 char *do_item_stats_sizes(uint32_t (*add_stats)(char *buf,
23                           const char *key, const uint16_t klen, const char *val,
24                           const uint32_t vlen, void *cookie), void *c, int *bytes);
25 
26 void do_item_flush_expired(void);
27 
28 item *do_item_get(const char *key, const size_t nkey);
29 item *do_item_get_nocheck(const char *key, const size_t nkey);
30