xref: /memcached-1.4.29/items.h (revision fba0a891)
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 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);
24 item *do_item_get_nocheck(const char *key, const size_t nkey);
25 void item_stats_reset(void);
26 extern pthread_mutex_t cache_lock;
27