<commit_before>#ifndef MULTIVERSO_TABLE_INTERFACE_H_
#define MULTIVERSO_TABLE_INTERFACE_H_

#include <string>
#include <unordered_map>
#include <vector>
#include <cctype>

#include "multiverso/blob.h"

namespace std { class mutex; }

namespace multiverso {

typedef int32_t integer_t;

class Waiter;
struct AddOption;
struct GetOption;

// User implementent this
class WorkerTable {
public:
  WorkerTable();
  virtual ~WorkerTable();

  void Get(Blob keys, const GetOption* option = nullptr);
  void Add(Blob keys, Blob values, const AddOption* option = nullptr);

  int GetAsync(Blob keys, const GetOption* option = nullptr);
  int AddAsync(Blob keys, Blob values, const AddOption* option = nullptr);

  void Wait(int id);

  void Reset(int msg_id, int num_wait);

  void Notify(int id);

  virtual int Partition(const std::vector<Blob>& kv,
    std::unordered_map<int, std::vector<Blob> >* out) = 0;

  virtual void ProcessReplyGet(std::vector<Blob>&) = 0;

  // add user defined data structure
private:
  std::string table_name_;
  // assuming there are at most 2^32 tables
  int table_id_;
  std::mutex* m_;
  std::vector<Waiter*> waitings_;
  int msg_id_;
};

// TODO(feiga): move to a seperate file
class Stream;

// interface for checkpoint table
class Serializable {
public:
  virtual void Store(Stream* s) = 0;
  virtual void Load(Stream* s) = 0;
};

// discribe the server parameter storage data structure and related method
class ServerTable : public Serializable {
public:
  ServerTable();<commit_msg>Hotfix for master branch compile error in Linux.<commit_after>#ifndef MULTIVERSO_TABLE_INTERFACE_H_
#define MULTIVERSO_TABLE_INTERFACE_H_

#include <string>
#include <unordered_map>
#include <vector>
#include <cctype>

#include "multiverso/blob.h"
#include "multiverso/io/io.h"

namespace std { class mutex; }

namespace multiverso {

typedef int32_t integer_t;

class Waiter;
struct AddOption;
struct GetOption;

// User implementent this
class WorkerTable {
public:
  WorkerTable();
  virtual ~WorkerTable();

  void Get(Blob keys, const GetOption* option = nullptr);
  void Add(Blob keys, Blob values, const AddOption* option = nullptr);

  int GetAsync(Blob keys, const GetOption* option = nullptr);
  int AddAsync(Blob keys, Blob values, const AddOption* option = nullptr);

  void Wait(int id);

  void Reset(int msg_id, int num_wait);

  void Notify(int id);

  virtual int Partition(const std::vector<Blob>& kv,
    std::unordered_map<int, std::vector<Blob> >* out) = 0;

  virtual void ProcessReplyGet(std::vector<Blob>&) = 0;

  // add user defined data structure
private:
  std::string table_name_;
  // assuming there are at most 2^32 tables
  int table_id_;
  std::mutex* m_;
  std::vector<Waiter*> waitings_;
  int msg_id_;
};

// interface for checkpoint table
class Serializable {
public:
  virtual void Store(Stream* s) = 0;
  virtual void Load(Stream* s) = 0;
};

// discribe the server parameter storage data structure and related method
class ServerTable : public Serializable {
public:
  ServerTable();
{'fraction_non_alphanumeric': 0.10507246376811594, 'fraction_numerical': 0.005928853754940711, 'mean_word_length': 4.8403846153846155, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '7469687', 'n_tokens_mistral': 1000, 'n_tokens_neox': 958, 'n_words': 316}