forked from membase/ep-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathep_extension.h
More file actions
38 lines (27 loc) · 990 Bytes
/
ep_extension.h
File metadata and controls
38 lines (27 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef EP_EXTENSION_H
#define EP_EXTENSION_H 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ep.hh"
#include <memcached/extension.h>
extern "C" {
typedef ENGINE_ERROR_CODE (*RESPONSE_HANDLER_T)(const void *, int , const char *);
}
/**
* Protocol extensions to support item locking.
*/
class GetlExtension: public EXTENSION_ASCII_PROTOCOL_DESCRIPTOR {
public:
GetlExtension(EventuallyPersistentStore *kvstore, GET_SERVER_API get_server_api);
void initialize();
ENGINE_ERROR_CODE executeGetl(int argc, token_t *argv, void *cookie,
RESPONSE_HANDLER_T response_handler);
ENGINE_ERROR_CODE executeUnl(int argc, token_t *argv, void *cookie,
RESPONSE_HANDLER_T response_handler);
private:
SERVER_HANDLE_V1 *serverApi;
EventuallyPersistentStore *backend;
};
#endif /* EP_EXTENSION_H */