mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 02:50:33 +00:00
these unused includes were identified by clangd. see https://clangd.llvm.org/guides/include-cleaner#unused-include-warning for more details on the "Unused include" warning. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com> Closes scylladb/scylladb#16914
40 lines
944 B
C++
40 lines
944 B
C++
/*
|
|
*
|
|
* Modified by ScyllaDB
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
|
|
*/
|
|
|
|
#include "locator/snitch_base.hh"
|
|
#include "gms/application_state.hh"
|
|
#include "utils/class_registrator.hh"
|
|
|
|
namespace locator {
|
|
|
|
gms::application_state_map snitch_base::get_app_states() const {
|
|
return {
|
|
{gms::application_state::DC, gms::versioned_value::datacenter(_my_dc)},
|
|
{gms::application_state::RACK, gms::versioned_value::rack(_my_rack)},
|
|
};
|
|
}
|
|
|
|
snitch_ptr::snitch_ptr(const snitch_config cfg)
|
|
{
|
|
i_endpoint_snitch::ptr_type s;
|
|
try {
|
|
s = create_object<i_endpoint_snitch>(cfg.name, cfg);
|
|
} catch (no_such_class& e) {
|
|
i_endpoint_snitch::logger().error("Can't create snitch {}: not supported", cfg.name);
|
|
throw;
|
|
} catch (...) {
|
|
throw;
|
|
}
|
|
s->set_backreference(*this);
|
|
_ptr = std::move(s);
|
|
}
|
|
|
|
} // namespace locator
|