#include "memcached.h"
#include <assert.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
Classes | |
struct | conn_queue_item |
struct | conn_queue |
Defines | |
#define | ITEMS_PER_ALLOC 64 |
Typedefs | |
typedef struct conn_queue_item | CQ_ITEM |
typedef struct conn_queue | CQ |
Functions | |
void | accept_new_conns (const bool do_accept) |
void | dispatch_conn_new (int sfd, enum conn_states init_state, int event_flags, int read_buffer_size, enum protocol prot) |
int | is_listen_thread () |
item * | item_alloc (char *key, size_t nkey, int flags, rel_time_t exptime, int nbytes) |
item * | item_get (const char *key, const size_t nkey) |
int | item_link (item *item) |
void | item_remove (item *item) |
int | item_replace (item *old_it, item *new_it) |
void | item_unlink (item *item) |
void | item_update (item *item) |
char * | add_delta (conn *c, item *item, int incr, const int64_t delta, char *buf) |
enum store_item_type | store_item (item *item, int comm, conn *c) |
void | item_flush_expired () |
char * | item_cachedump (unsigned int slabs_clsid, unsigned int limit, unsigned int *bytes) |
void | item_stats (ADD_STAT add_stats, void *c) |
void | item_stats_sizes (ADD_STAT add_stats, void *c) |
void | STATS_LOCK () |
void | STATS_UNLOCK () |
void | threadlocal_stats_reset (void) |
void | threadlocal_stats_aggregate (struct thread_stats *stats) |
void | slab_stats_aggregate (struct thread_stats *stats, struct slab_stats *out) |
void | thread_init (int nthreads, struct event_base *main_base) |
Variables | |
pthread_mutex_t | cache_lock |
pthread_mutex_t | conn_lock = PTHREAD_MUTEX_INITIALIZER |
#define ITEMS_PER_ALLOC 64 |
typedef struct conn_queue CQ |
typedef struct conn_queue_item CQ_ITEM |
void accept_new_conns | ( | const bool | do_accept | ) |
void dispatch_conn_new | ( | int | sfd, | |
enum conn_states | init_state, | |||
int | event_flags, | |||
int | read_buffer_size, | |||
enum protocol | prot | |||
) |
int is_listen_thread | ( | void | ) |
item* item_alloc | ( | char * | key, | |
size_t | nkey, | |||
int | flags, | |||
rel_time_t | exptime, | |||
int | nbytes | |||
) |
char* item_cachedump | ( | unsigned int | slabs_clsid, | |
unsigned int | limit, | |||
unsigned int * | bytes | |||
) |
void item_flush_expired | ( | void | ) |
item* item_get | ( | const char * | key, | |
const size_t | nkey | |||
) |
int item_link | ( | item * | item | ) |
void item_remove | ( | item * | item | ) |
void item_stats | ( | ADD_STAT | add_stats, | |
void * | c | |||
) |
void item_stats_sizes | ( | ADD_STAT | add_stats, | |
void * | c | |||
) |
void item_unlink | ( | item * | item | ) |
void item_update | ( | item * | item | ) |
void slab_stats_aggregate | ( | struct thread_stats * | stats, | |
struct slab_stats * | out | |||
) |
void STATS_LOCK | ( | void | ) |
void STATS_UNLOCK | ( | void | ) |
enum store_item_type store_item | ( | item * | item, | |
int | comm, | |||
conn * | c | |||
) |
void thread_init | ( | int | nthreads, | |
struct event_base * | main_base | |||
) |
void threadlocal_stats_aggregate | ( | struct thread_stats * | stats | ) |
void threadlocal_stats_reset | ( | void | ) |
pthread_mutex_t cache_lock |
pthread_mutex_t conn_lock = PTHREAD_MUTEX_INITIALIZER |