-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconvchecker_impl.cpp
48 lines (40 loc) · 1.76 KB
/
convchecker_impl.cpp
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
// this program is automatically generated by jenerator. do not edit.
#include <jubatus/framework.hpp>
#include "convchecker_server.hpp"
#include "convchecker_serv.hpp"
using namespace jubatus;
using namespace jubatus::framework;
namespace jubatus { namespace server {
class convchecker_impl_ : public convchecker<convchecker_impl_>
{
public:
convchecker_impl_(const server_argv& a):
convchecker<convchecker_impl_>(a.timeout),
p_(new server_helper<convchecker_serv>(a))
{}
bool set_config(std::string name, config_data c) //update broadcast
{ JWLOCK__(p_); return get_p()->set_config(c); }
config_data get_config(std::string name) //analysis random
{ JRLOCK__(p_); return get_p()->get_config(); }
std::string query(std::string name, datum query) //update random
{ JWLOCK__(p_); return get_p()->query(query); }
std::string bulk_query(std::string name, std::vector<datum > query) //update random
{ JWLOCK__(p_); return get_p()->bulk_query(query); }
bool save(std::string name, std::string id) //update broadcast
{ JWLOCK__(p_); return get_p()->save(id); }
bool load(std::string name, std::string id) //update broadcast
{ JWLOCK__(p_); return get_p()->load(id); }
std::map<std::string,std::map<std::string,std::string > > get_status(std::string name) //analysis broadcast
{ JRLOCK__(p_); return p_->get_status(); }
int run(){ return p_->start(*this); };
common::cshared_ptr<convchecker_serv> get_p(){ return p_->server(); };
private:
common::cshared_ptr<server_helper<convchecker_serv> > p_;
};
}} // namespace jubatus::server
int main(int args, char** argv){
return
jubatus::framework::run_server<jubatus::server::convchecker_impl_,
jubatus::server::convchecker_serv>
(args, argv, "convchecker");
}