MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
server_api.h
1 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 #ifndef MEMCACHED_SERVER_API_H
3 #define MEMCACHED_SERVER_API_H
4 #include <inttypes.h>
5 
6 #include <memcached/types.h>
7 #include <memcached/config_parser.h>
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13  typedef struct {
17  rel_time_t (*get_current_time)(void);
18 
22  rel_time_t (*realtime)(const time_t exptime);
23 
27  time_t (*abstime)(const rel_time_t exptime);
28 
34  const char* (*server_version)(void);
35 
44  uint32_t (*hash)(const void *data, size_t size, uint32_t seed);
45 
49  int (*parse_config)(const char *str, struct config_item items[], FILE *error);
50 
54  void (*shutdown)(void);
55 
60  bool (*get_config)(struct config_item items[]);
61 
63 
64  typedef struct {
69  void *(*new_stats)(void);
70  void (*release_stats)(void*);
71 
75  void (*evicting)(const void *cookie,
76  const void *key,
77  int nkey);
79 
83  typedef struct {
91  int (*get_socket_fd)(const void *cookie);
92 
101  void (*get_auth_data)(const void *cookie, auth_data_t *data);
102 
114  void (*store_engine_specific)(const void *cookie, void *engine_data);
115 
124  void *(*get_engine_specific)(const void *cookie);
125 
131  void (*notify_io_complete)(const void *cookie,
132  ENGINE_ERROR_CODE status);
133 
134 
142  void (*set_tap_nack_mode)(const void *cookie, bool enable);
143 
149  void (*reserve)(const void *cookie);
150 
156  void (*release)(const void *cookie);
157 
158 
160 
161 #ifdef __WIN32__
162 #undef interface
163 #endif
164 
165  typedef SERVER_HANDLE_V1* (*GET_SERVER_API)(void);
166 
167 #ifdef __cplusplus
168 }
169 #endif
170 
171 #endif