An interface class to a basic hash table, that ut_lock_free_hash_t is.
More...
#include <ut0lock_free_hash.h>
|
virtual | ~ut_hash_interface_t ()=default |
| Destructor. More...
|
|
virtual int64_t | get (uint64_t key) const =0 |
| Get the value mapped to a given key. More...
|
|
virtual void | set (uint64_t key, int64_t val)=0 |
| Set the value for a given key, either inserting a new (key, val) tuple or overwriting an existent value. More...
|
|
virtual void | del (uint64_t key)=0 |
| Delete a (key, val) pair from the hash. More...
|
|
virtual void | inc (uint64_t key)=0 |
| Increment the value for a given key with 1 or insert a new tuple (key, 1). More...
|
|
virtual void | dec (uint64_t key)=0 |
| Decrement the value of a given key with 1 or insert a new tuple (key, -1). More...
|
|
|
static const int64_t | NOT_FOUND = INT64_MAX |
| The value that is returned when the searched for key is not found. More...
|
|
An interface class to a basic hash table, that ut_lock_free_hash_t is.
◆ ~ut_hash_interface_t()
virtual ut_hash_interface_t::~ut_hash_interface_t |
( |
| ) |
|
|
virtualdefault |
◆ dec()
virtual void ut_hash_interface_t::dec |
( |
uint64_t |
key | ) |
|
|
pure virtual |
Decrement the value of a given key with 1 or insert a new tuple (key, -1).
- Parameters
-
[in] | key | key whose value to decrement |
Implemented in ut_lock_free_hash_t.
◆ del()
virtual void ut_hash_interface_t::del |
( |
uint64_t |
key | ) |
|
|
pure virtual |
Delete a (key, val) pair from the hash.
- Parameters
-
[in] | key | key whose pair to delete |
Implemented in ut_lock_free_hash_t.
◆ get()
virtual int64_t ut_hash_interface_t::get |
( |
uint64_t |
key | ) |
const |
|
pure virtual |
Get the value mapped to a given key.
- Parameters
-
- Returns
- the value that corresponds to key or NOT_FOUND.
Implemented in ut_lock_free_hash_t.
◆ inc()
virtual void ut_hash_interface_t::inc |
( |
uint64_t |
key | ) |
|
|
pure virtual |
Increment the value for a given key with 1 or insert a new tuple (key, 1).
- Parameters
-
[in] | key | key whose value to increment or insert as 1 |
Implemented in ut_lock_free_hash_t.
◆ set()
virtual void ut_hash_interface_t::set |
( |
uint64_t |
key, |
|
|
int64_t |
val |
|
) |
| |
|
pure virtual |
Set the value for a given key, either inserting a new (key, val) tuple or overwriting an existent value.
- Parameters
-
[in] | key | key whose value to set |
[in] | val | value to be set |
Implemented in ut_lock_free_hash_t.
◆ NOT_FOUND
const int64_t ut_hash_interface_t::NOT_FOUND = INT64_MAX |
|
static |
The value that is returned when the searched for key is not found.
The documentation for this class was generated from the following file: