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, const uint32_t cur_hv); 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 void do_item_update_nolock(item *it); 15 int do_item_replace(item *it, item *new_it, const uint32_t hv); 16 17 /*@null@*/ 18 char *do_item_cachedump(const unsigned int slabs_clsid, const unsigned int limit, unsigned int *bytes); 19 void do_item_stats(ADD_STAT add_stats, void *c); 20 void do_item_stats_totals(ADD_STAT add_stats, void *c); 21 /*@null@*/ 22 void do_item_stats_sizes(ADD_STAT add_stats, void *c); 23 void do_item_flush_expired(void); 24 25 item *do_item_get(const char *key, const size_t nkey, const uint32_t hv); 26 item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv); 27 void item_stats_reset(void); 28 extern pthread_mutex_t cache_lock; 29 void item_stats_evictions(uint64_t *evicted); 30 31 enum crawler_result_type { 32 CRAWLER_OK=0, CRAWLER_RUNNING, CRAWLER_BADCLASS 33 }; 34 35 int start_item_crawler_thread(void); 36 int stop_item_crawler_thread(void); 37 int init_lru_crawler(void); 38 enum crawler_result_type lru_crawler_crawl(char *slabs); 39