mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 02:20:37 +00:00
streaming: Make stream_session::_handlers static
It is used to register the streaming message handler once. We don't need it in every stream_session instance. The side effect is making stream_session copyable, which is needed in get_all_stream_sessions.
This commit is contained in:
@@ -86,6 +86,8 @@ void stream_session::init_messaging_service_handler() {
|
||||
});
|
||||
}
|
||||
|
||||
distributed<stream_session::handler> stream_session::_handlers;
|
||||
|
||||
future<> stream_session::start() {
|
||||
return _handlers.start().then([this] {
|
||||
return _handlers.invoke_on_all([this] (handler& h) {
|
||||
|
||||
@@ -123,7 +123,7 @@ private:
|
||||
return make_ready_future<>();
|
||||
}
|
||||
};
|
||||
distributed<handler> _handlers;
|
||||
static distributed<handler> _handlers;
|
||||
void init_messaging_service_handler();
|
||||
future<> start();
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user