]> git.proxmox.com Git - ceph.git/blob - ceph/src/tools/immutable_object_cache/CacheController.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / tools / immutable_object_cache / CacheController.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef CEPH_CACHE_CACHE_CONTROLLER_H
5 #define CEPH_CACHE_CACHE_CONTROLLER_H
6
7 #include "common/ceph_context.h"
8 #include "common/WorkQueue.h"
9 #include "CacheServer.h"
10 #include "ObjectCacheStore.h"
11
12 namespace ceph {
13 namespace immutable_obj_cache {
14
15 class CacheController {
16 public:
17 CacheController(CephContext *cct, const std::vector<const char*> &args);
18 ~CacheController();
19
20 int init();
21
22 int shutdown();
23
24 void handle_signal(int sinnum);
25
26 void run();
27
28 void handle_request(CacheSession* session, ObjectCacheRequest* msg);
29
30 private:
31 CacheServer *m_cache_server;
32 std::vector<const char*> m_args;
33 CephContext *m_cct;
34 ObjectCacheStore *m_object_cache_store;
35 };
36
37 } // namespace immutable_obj_cache
38 } // namespace ceph
39
40 #endif // CEPH_CACHE_CACHE_CONTROLLER_H