Skip to content

src/processing/impl/processing_subtask_result_storage_impl.hpp

Namespaces

Name
sgns
sgns::processing

Classes

Name
class sgns::processing::SubTaskResultStorageImpl
Handles subtask result storage.

Source code

#ifndef GRPC_FOR_SUPERGENIUS_PROCESSING_SUBTASK_RESULT_STORAGE_IMPL_HPP
#define GRPC_FOR_SUPERGENIUS_PROCESSING_SUBTASK_RESULT_STORAGE_IMPL_HPP

#include "processing/processing_subtask_result_storage.hpp"
#include "crdt/globaldb/globaldb.hpp"

namespace sgns::processing
{
    class SubTaskResultStorageImpl : public SubTaskResultStorage
    {
    public:
        SubTaskResultStorageImpl( std::shared_ptr<crdt::GlobalDB> db, std::string topic );

        ~SubTaskResultStorageImpl() override;

        void AddSubTaskResult( const SGProcessing::SubTaskResult &result ) override;

        void RemoveSubTaskResult( const std::string &subTaskId ) override;

        std::vector<SGProcessing::SubTaskResult> GetSubTaskResults( const std::set<std::string> &subTaskIds ) override;

    private:
        std::shared_ptr<sgns::crdt::GlobalDB> m_db;
        std::string                           m_processing_topic;
    };
}

#endif // GRPC_FOR_SUPERGENIUS_PROCESSING_SUBTASK_RESULT_STORAGE_IMPL_HPP

Updated on 2026-03-04 at 13:10:44 -0800