forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquery_processor.hh
55 lines (40 loc) · 1.07 KB
/
query_processor.hh
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Copyright (C) 2019 pengjian.uestc @ gmail.com
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
*/
#pragma once
#include <seastar/core/sharded.hh>
#include <seastar/core/shared_ptr.hh>
#include <seastar/core/gate.hh>
#include <seastar/core/metrics_registration.hh>
#include "data_dictionary/data_dictionary.hh"
class service_permit;
namespace service {
class storage_proxy;
}
namespace redis {
class redis_options;
struct request;
struct reply;
class redis_message;
class query_processor {
service::storage_proxy& _proxy;
data_dictionary::database _db;
seastar::metrics::metric_groups _metrics;
seastar::gate _pending_command_gate;
public:
query_processor(service::storage_proxy& proxy, data_dictionary::database db);
~query_processor();
data_dictionary::database db() {
return _db;
}
service::storage_proxy& proxy() {
return _proxy;
}
seastar::future<redis_message> process(request&&, redis_options&, service_permit);
seastar::future<> start();
seastar::future<> stop();
};
}