Files
scylladb/transport/server.hh
Glauber Costa b488b06fa4 cql_server: define and call a stop method
All sharded services "should" define a stop method. Calling them is also
a good practice.

Blindly calling it at exit is wrong, but it is less wrong than not calling
it at all, and makes it now equally as wrong as any of the other services.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-23 11:11:57 -04:00

32 lines
726 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);
future<> stop();
private:
class fmt_visitor;
class connection;
class response;
friend class type_codec;
};
#endif