/* * * Modified by ScyllaDB * Copyright (C) 2015-present ScyllaDB */ /* * SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.0 and Apache-2.0) */ #pragma once #include "streaming/session_info.hh" #include "streaming/stream_fwd.hh" #include namespace streaming { /** * Current snapshot of streaming progress. */ class stream_state { public: streaming::plan_id plan_id; sstring description; std::vector sessions; stream_state(streaming::plan_id plan_id_, sstring description_, std::vector sessions_) : plan_id(std::move(plan_id_)) , description(std::move(description_)) , sessions(std::move(sessions_)) { } bool has_failed_session() const { for (auto const& x : sessions) { if (x.is_failed()) { return true; } } return false; } }; } // namespace streaming