Results from a SPECsfs run with 8GB of memory
[bluesky.git] / kvstore / kvservice.h
1 #ifndef _KVSERVICE_H_
2 #define _KVSERVICE_H_ 1
3
4 #include "kvstore.pb.h"
5 #include "backend.h"
6
7 #include <memory>
8
9 using std::auto_ptr;
10
11 namespace kvstore
12 {
13     class KeyValueRpcService : public ::kvrpc::KeyValueService
14     {
15     public:
16         KeyValueRpcService(Backend *backend);
17
18         virtual ~KeyValueRpcService();
19
20         virtual void PutValue(::google::protobuf::RpcController* controller,
21                               const ::kvrpc::Put* request,
22                               ::kvrpc::PutReply* response,
23                               ::google::protobuf::Closure* done);
24         virtual void GetValue(::google::protobuf::RpcController* controller,
25                               const ::kvrpc::Get* request,
26                               ::kvrpc::GetReply* response,
27                               ::google::protobuf::Closure* done);
28     private:
29         auto_ptr<Backend> _backend;
30
31     };
32 } // namespace kvstore
33
34 #endif