Class SimpleHashDistributor

Inheritance Relationships

Base Type

Class Documentation

class gkfs::rpc::SimpleHashDistributor : public gkfs::rpc::Distributor

Public Functions

SimpleHashDistributor()
SimpleHashDistributor(host_t localhost, unsigned int hosts_size)
virtual host_t localhost() const override
virtual host_t locate_data(const std::string &path, const chunkid_t &chnk_id) const override
virtual host_t locate_data(const std::string &path, const chunkid_t &chnk_id, unsigned int host_size)
virtual host_t locate_file_metadata(const std::string &path) const override
virtual std::vector<host_t> locate_directory_metadata(const std::string &path) const override

Private Members

host_t localhost_
unsigned int hosts_size_ = {0}
std::vector<host_t> all_hosts_
std::hash<std::string> str_hash