<commit_before>#ifndef __UNITTEST_DUMMY_NAMESPACE_PROTOCOL_HPP__
#define __UNITTEST_DUMMY_NAMESPACE_PROTOCOL_HPP__

#include <vector>
#include <set>
#include <string>
#include <map>

#include "utils.hpp"
#include <boost/function.hpp>

#include "concurrency/fifo_checker.hpp"


struct signal_t;

namespace unittest {

class dummy_protocol_t {

public:

    class region_t {

    public:
        bool contains(const region_t &r);
        bool overlaps(const region_t &r);
        region_t intersection(const region_t &r);

        std::set<std::string> keys;
    };

    class temporary_cache_t {
        /* Dummy protocol doesn't need to cache anything */
    };

    class read_response_t {

    public:
        std::map<std::string, std::string> values;
    };

    class read_t {

    public:
        region_t get_region();
        std::vector<read_t> shard(std::vector<region_t> regions);
        read_response_t unshard(std::vector<read_response_t> resps, temporary_cache_t *cache);

        region_t keys;
    };

    class write_response_t {

    public:
        std::map<std::string, std::string> old_values;
    };

    class write_t {

    public:
        region_t get_region();
        std::vector<write_t> shard(std::vector<region_t> regions);
        write_response_t unshard(std::vector<write_response_t> resps, temporary_cache_t *cache);

        std::map<std::string, std::string> values;
    };

    class store_t {

    public:
        region_t get_region();<commit_msg>Made dummy_protocol_t serializable where it's supposed to be.<commit_after>#ifndef __UNITTEST_DUMMY_NAMESPACE_PROTOCOL_HPP__
#define __UNITTEST_DUMMY_NAMESPACE_PROTOCOL_HPP__

#include <vector>
#include <set>
#include <string>
#include <map>

#include "utils.hpp"
#include <boost/function.hpp>

#include "concurrency/fifo_checker.hpp"
#include "rpc/serialize_macros.hpp"


struct signal_t;

namespace unittest {

class dummy_protocol_t {

public:

    class region_t {

    public:
        bool contains(const region_t &r);
        bool overlaps(const region_t &r);
        region_t intersection(const region_t &r);

        RDB_MAKE_ME_SERIALIZABLE_1(keys);

        std::set<std::string> keys;
    };

    class temporary_cache_t {
        /* Dummy protocol doesn't need to cache anything */
    };

    class read_response_t {

    public:
        RDB_MAKE_ME_SERIALIZABLE_1(values);

        std::map<std::string, std::string> values;
    };

    class read_t {

    public:
        region_t get_region();
        std::vector<read_t> shard(std::vector<region_t> regions);
        read_response_t unshard(std::vector<read_response_t> resps, temporary_cache_t *cache);

        RDB_MAKE_ME_SERIALIZABLE_1(keys);

        region_t keys;
    };

    class write_response_t {

    public:
        RDB_MAKE_ME_SERIALIZABLE_1(old_values);

        std::map<std::string, std::string> old_values;
    };

    class write_t {

    public:
        region_t get_region();
        std::vector<write_t> shard(std::vector<region_t> regions);
        write_response_t unshard(std::vector<write_response_t> resps, temporary_cache_t *cache);

        RDB_MAKE_ME_SERIALIZABLE_1(values);

        std::map<std::string, std::string> values;
    };

    class store_t {

    public:
        region_t get_region();
{'fraction_non_alphanumeric': 0.10660980810234541, 'fraction_numerical': 0.0015229972586049345, 'mean_word_length': 3.304062909567497, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1187491', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1096, 'n_words': 211}