OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DBHandler::GeoCopyFromSessions Struct Reference

Public Member Functions

std::optional< GeoCopyFromStateoperator() (const std::string &session_id)
 
void add (const std::string &session_id, const GeoCopyFromState &state)
 
void remove (const std::string &session_id)
 

Public Attributes

std::unordered_map
< std::string,
GeoCopyFromState
was_geo_copy_from
 
std::mutex geo_copy_from_mutex
 

Detailed Description

Definition at line 913 of file DBHandler.h.

Member Function Documentation

void DBHandler::GeoCopyFromSessions::add ( const std::string &  session_id,
const GeoCopyFromState state 
)
inline

Definition at line 926 of file DBHandler.h.

References CHECK.

Referenced by DBHandler::sql_execute_impl().

926  {
927  std::lock_guard<std::mutex> map_lock(geo_copy_from_mutex);
928  const auto ret = was_geo_copy_from.insert(std::make_pair(session_id, state));
929  CHECK(ret.second);
930  }
std::unordered_map< std::string, GeoCopyFromState > was_geo_copy_from
Definition: DBHandler.h:914
#define CHECK(condition)
Definition: Logger.h:203

+ Here is the caller graph for this function:

std::optional<GeoCopyFromState> DBHandler::GeoCopyFromSessions::operator() ( const std::string &  session_id)
inline

Definition at line 917 of file DBHandler.h.

917  {
918  std::lock_guard<std::mutex> map_lock(geo_copy_from_mutex);
919  auto itr = was_geo_copy_from.find(session_id);
920  if (itr == was_geo_copy_from.end()) {
921  return std::nullopt;
922  }
923  return itr->second;
924  }
std::unordered_map< std::string, GeoCopyFromState > was_geo_copy_from
Definition: DBHandler.h:914
void DBHandler::GeoCopyFromSessions::remove ( const std::string &  session_id)
inline

Definition at line 932 of file DBHandler.h.

Referenced by DBHandler::process_geo_copy_from(), and DBHandler::sql_execute().

932  {
933  std::lock_guard<std::mutex> map_lock(geo_copy_from_mutex);
934  was_geo_copy_from.erase(session_id);
935  }
std::unordered_map< std::string, GeoCopyFromState > was_geo_copy_from
Definition: DBHandler.h:914

+ Here is the caller graph for this function:

Member Data Documentation

std::mutex DBHandler::GeoCopyFromSessions::geo_copy_from_mutex

Definition at line 915 of file DBHandler.h.

std::unordered_map<std::string, GeoCopyFromState> DBHandler::GeoCopyFromSessions::was_geo_copy_from

Definition at line 914 of file DBHandler.h.


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