OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OverlapsHashTableCache< K, V > Class Template Reference

#include <OverlapsJoinHashTable.h>

+ Inheritance diagram for OverlapsHashTableCache< K, V >:
+ Collaboration diagram for OverlapsHashTableCache< K, V >:

Public Member Functions

std::optional< std::pair< K, V > > getWithKey (const K &key)
 
- Public Member Functions inherited from HashTableCache< K, V >
 HashTableCache ()
 
std::function< void()> getCacheInvalidator ()
 
getCachedHashTable (const size_t idx)
 
size_t getNumberOfCachedHashTables ()
 
void clear ()
 
void insert (const K &key, V &hash_table)
 
std::optional< V > get (const K &key)
 

Additional Inherited Members

- Protected Attributes inherited from HashTableCache< K, V >
std::vector< std::pair< K, V > > contents_
 
std::mutex mutex_
 

Detailed Description

template<class K, class V>
class OverlapsHashTableCache< K, V >

Definition at line 74 of file OverlapsJoinHashTable.h.

Member Function Documentation

template<class K , class V >
std::optional<std::pair<K, V> > OverlapsHashTableCache< K, V >::getWithKey ( const K &  key)
inline

Definition at line 76 of file OverlapsJoinHashTable.h.

References HashTableCache< K, V >::contents_, and HashTableCache< K, V >::mutex_.

76  {
77  std::lock_guard<std::mutex> guard(this->mutex_);
78  for (const auto& kv : this->contents_) {
79  if (kv.first == key) {
80  return kv;
81  }
82  }
83  return std::nullopt;
84  }
std::mutex mutex_
std::vector< std::pair< K, V > > contents_

The documentation for this class was generated from the following file: