storage_proxy holds per cpu state now to track clustering, so it has to be distributed otherwise smp setup does not work.
31 lines
705 B
C++
31 lines
705 B
C++
/*
|
|
* Copyright (C) 2015 Cloudius Systems, Ltd.
|
|
*/
|
|
|
|
#ifndef CQL_SERVER_HH
|
|
#define CQL_SERVER_HH
|
|
|
|
#include "core/reactor.hh"
|
|
#include "service/storage_proxy.hh"
|
|
#include "cql3/query_processor.hh"
|
|
#include "core/distributed.hh"
|
|
|
|
class database;
|
|
|
|
class cql_server {
|
|
std::vector<server_socket> _listeners;
|
|
distributed<service::storage_proxy>& _proxy;
|
|
distributed<cql3::query_processor>& _query_processor;
|
|
public:
|
|
cql_server(distributed<service::storage_proxy>& proxy, distributed<cql3::query_processor>& qp);
|
|
future<> listen(ipv4_addr addr);
|
|
void do_accepts(int which);
|
|
private:
|
|
class fmt_visitor;
|
|
class connection;
|
|
class response;
|
|
friend class type_codec;
|
|
};
|
|
|
|
#endif
|