MySQL 8.0.40
Source Code Documentation
cache_api.cc File Reference
#include <chrono>
#include <map>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <string>
#include "metadata_cache_ar.h"
#include "metadata_cache_gr.h"
#include "mysqlrouter/metadata_cache.h"
#include "cluster_metadata.h"

Namespaces

 

Macros

#define LOCK_METADATA_AND_CHECK_INITIALIZED()
 

Functions

static std::unique_ptr< MetadataCacheg_metadata_cache (nullptr)
 

Variables

static std::mutex g_metadata_cache_m
 

Macro Definition Documentation

◆ LOCK_METADATA_AND_CHECK_INITIALIZED

#define LOCK_METADATA_AND_CHECK_INITIALIZED ( )
Value:
std::lock_guard<std::mutex> lock(g_metadata_cache_m); \
if (g_metadata_cache == nullptr) { \
throw std::runtime_error("Metadata Cache not initialized"); \
}
static std::mutex g_metadata_cache_m
Definition: cache_api.cc:41
static std::unique_ptr< MetadataCache > g_metadata_cache(nullptr)
static std::mutex lock
Definition: net_ns.cc:56

Function Documentation

◆ g_metadata_cache()

static std::unique_ptr< MetadataCache > g_metadata_cache ( nullptr  )
static

Variable Documentation

◆ g_metadata_cache_m

std::mutex g_metadata_cache_m
static