-
Notifications
You must be signed in to change notification settings - Fork 83
/
hashmap.h
46 lines (34 loc) · 940 Bytes
/
hashmap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef HASHMAP
#define HASHMAP
#include <string>
#include <iostream>
#include <map>
#include "murmurhash3.h"
#include "hamming.h"
namespace hashmap
{
class Monitoring;
class HashMap
{
public:
HashMap() {
monitoring_ = NULL;
}
virtual ~HashMap() {
}
virtual int Open() = 0;
virtual int Close() = 0;
virtual int Get(const std::string& key, std::string* value) = 0;
virtual int Put(const std::string& key, const std::string& value) = 0;
virtual int Exists(const std::string& key) = 0;
virtual int Remove(const std::string& key) = 0;
virtual int Dump() = 0;
virtual int CheckDensity() = 0;
virtual int BucketCounts() = 0;
virtual int GetBucketState(int index) = 0;
virtual int FillInitIndex(uint64_t index_stored, uint64_t *index_init) = 0;
virtual void GetMetadata(std::map< std::string, std::string >& metadata) = 0;
Monitoring *monitoring_;
};
}; // end namespace hashmap
#endif // HASHMAP