MySQL 9.1.0
Source Code Documentation
ut_hash_interface_t Class Referenceabstract

An interface class to a basic hash table, that ut_lock_free_hash_t is. More...

#include <ut0lock_free_hash.h>

Inheritance diagram for ut_hash_interface_t:
[legend]

Public Member Functions

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 Public Attributes

static const int64_t NOT_FOUND = INT64_MAX
 The value that is returned when the searched for key is not found. More...
 

Detailed Description

An interface class to a basic hash table, that ut_lock_free_hash_t is.

Constructor & Destructor Documentation

◆ ~ut_hash_interface_t()

virtual ut_hash_interface_t::~ut_hash_interface_t ( )
virtualdefault

Destructor.

Member Function Documentation

◆ 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]keykey 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]keykey 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
[in]keykey to look for
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]keykey 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]keykey whose value to set
[in]valvalue to be set

Implemented in ut_lock_free_hash_t.

Member Data Documentation

◆ 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: