#include "memcached.h"
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/signal.h>
#include <sys/resource.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
Classes | |
struct | itemstats_t |
Defines | |
#define | ITEM_UPDATE_INTERVAL 60 |
#define | LARGEST_ID 255 |
#define | DEBUG_REFCNT(it, op) while(0) |
Functions | |
void | item_init (void) |
void | item_stats_reset (void) |
uint64_t | get_cas_id (void) |
item * | do_item_alloc (char *key, const size_t nkey, const int flags, const rel_time_t exptime, const int nbytes) |
void | item_free (item *it) |
bool | item_size_ok (const size_t nkey, const int flags, const int nbytes) |
Returns true if an item will fit in the cache (its size does not exceed the maximum for a cache entry. | |
int | do_item_link (item *it) |
void | do_item_unlink (item *it) |
may fail if transgresses limits | |
void | do_item_remove (item *it) |
void | do_item_update (item *it) |
int | do_item_replace (item *it, item *new_it) |
update LRU time to current and reposition | |
char * | do_item_cachedump (const unsigned int slabs_clsid, const unsigned int limit, unsigned int *bytes) |
void | do_item_stats (ADD_STAT add_stats, void *c) |
void | do_item_stats_sizes (ADD_STAT add_stats, void *c) |
dumps out a list of objects of each size, with granularity of 32 bytes | |
item * | do_item_get (const char *key, const size_t nkey) |
wrapper around assoc_find which does the lazy expiration logic | |
item * | do_item_get_nocheck (const char *key, const size_t nkey) |
returns an item whether or not it's expired. | |
void | do_item_flush_expired (void) |
#define DEBUG_REFCNT | ( | it, | |||
op | ) | while(0) |
#define ITEM_UPDATE_INTERVAL 60 |
#define LARGEST_ID 255 |
item* do_item_alloc | ( | char * | key, | |
const size_t | nkey, | |||
const int | flags, | |||
const rel_time_t | exptime, | |||
const int | nbytes | |||
) |
char* do_item_cachedump | ( | const unsigned int | slabs_clsid, | |
const unsigned int | limit, | |||
unsigned int * | bytes | |||
) |
void do_item_flush_expired | ( | void | ) |
item* do_item_get | ( | const char * | key, | |
const size_t | nkey | |||
) |
wrapper around assoc_find which does the lazy expiration logic
item* do_item_get_nocheck | ( | const char * | key, | |
const size_t | nkey | |||
) |
returns an item whether or not it's expired.
int do_item_link | ( | item * | it | ) |
void do_item_remove | ( | item * | it | ) |
update LRU time to current and reposition
void do_item_stats | ( | ADD_STAT | add_stats, | |
void * | c | |||
) |
void do_item_stats_sizes | ( | ADD_STAT | add_stats, | |
void * | c | |||
) |
dumps out a list of objects of each size, with granularity of 32 bytes
void do_item_unlink | ( | item * | it | ) |
may fail if transgresses limits
void do_item_update | ( | item * | it | ) |
uint64_t get_cas_id | ( | void | ) |
void item_free | ( | item * | it | ) |
void item_init | ( | void | ) |
bool item_size_ok | ( | const size_t | nkey, | |
const int | flags, | |||
const int | nbytes | |||
) |
Returns true if an item will fit in the cache (its size does not exceed the maximum for a cache entry.
)
void item_stats_reset | ( | void | ) |