Commit 8b919c4d authored by caidaojin's avatar caidaojin

fix for ci comments

parent 8368bfce
......@@ -33,25 +33,22 @@ DEFINE_int32(chash_num_replicas, 100,
class ReplicaPolicy {
public:
ReplicaPolicy() : _hash_func(nullptr) {}
ReplicaPolicy(HashFunc hash) : _hash_func(hash) {}
virtual ~ReplicaPolicy() = default;
virtual bool Build(ServerId server,
size_t num_replicas,
std::vector<ConsistentHashingLoadBalancer::Node>* replicas) const = 0;
protected:
HashFunc _hash_func;
};
class DefaultReplicaPolicy : public ReplicaPolicy {
public:
DefaultReplicaPolicy(HashFunc hash) : ReplicaPolicy(hash) {}
DefaultReplicaPolicy(HashFunc hash) : _hash_func(hash) {}
virtual bool Build(ServerId server,
size_t num_replicas,
std::vector<ConsistentHashingLoadBalancer::Node>* replicas) const;
private:
HashFunc _hash_func;
};
bool DefaultReplicaPolicy::Build(ServerId server,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment