proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
ConsistentHash.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015-present, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
*/
10
11
#pragma once
12
13
#include <string>
14
#include <vector>
15
16
namespace
proxygen
{
17
18
class
ConsistentHash
{
19
public
:
20
virtual
~ConsistentHash
() {}
21
30
virtual
void
build
(std::vector<std::pair<std::string, uint64_t> > &) = 0;
31
38
virtual
size_t
get
(
const
uint64_t
key,
const
size_t
rank = 0)
const
= 0;
39
44
virtual
double
getMaxErrorRate
()
const
= 0;
45
};
46
}
proxygen::ConsistentHash::build
virtual void build(std::vector< std::pair< std::string, uint64_t > > &)=0
proxygen::ConsistentHash::getMaxErrorRate
virtual double getMaxErrorRate() const =0
proxygen::ConsistentHash
Definition:
ConsistentHash.h:18
uint64_t
uint64_t
Definition:
ConstexprMathBenchmark.cpp:190
proxygen
Definition:
ExMessageHandler.h:14
proxygen::ConsistentHash::~ConsistentHash
virtual ~ConsistentHash()
Definition:
ConsistentHash.h:20
proxygen
lib
utils
ConsistentHash.h
Generated by
1.8.11