OmniSciDB
a5dc49c757
|
#include <SessionsStore.h>
Public Member Functions | |
virtual SessionInfoPtr | add (const Catalog_Namespace::UserMetadata &user_meta, std::shared_ptr< Catalog > cat, ExecutorDeviceType device)=0 |
virtual SessionInfoPtr | get (const std::string &session_id)=0 |
void | erase (const std::string &session_id) |
void | eraseByUser (const std::string &user_name) |
void | eraseByDB (const std::string &db_name) |
std::vector< SessionInfoPtr > | getAllSessions () |
std::vector< SessionInfoPtr > | getUserSessions (const std::string &user_name) |
SessionInfoPtr | getByPublicID (const std::string &public_id) |
virtual | ~SessionsStore ()=default |
SessionInfo | getSessionCopy (const std::string &session_id) |
void | disconnect (const std::string session_id) |
Static Public Member Functions | |
static std::unique_ptr < SessionsStore > | create (const std::string &base_path, size_t n_workers, int idle_session_duration, int max_session_duration, int capacity, DisconnectCallback disconnect_callback) |
Protected Member Functions | |
bool | isSessionExpired (const SessionInfoPtr &session_ptr, int idle_session_duration, int max_session_duration) |
virtual bool | isSessionInUse (const SessionInfoPtr &session_ptr)=0 |
virtual SessionInfoPtr | getUnlocked (const std::string &session_id)=0 |
virtual void | eraseUnlocked (const std::string &session_id)=0 |
virtual DisconnectCallback | getDisconnectCallback ()=0 |
virtual std::vector < SessionInfoPtr > | getIf (std::function< bool(const SessionInfoPtr &)> predicate)=0 |
virtual void | eraseIf (std::function< bool(const SessionInfoPtr &)> predicate)=0 |
virtual heavyai::shared_mutex & | getLock ()=0 |
Definition at line 31 of file SessionsStore.h.
|
virtualdefault |
|
pure virtual |
Implemented in CachedSessionStore.
|
static |
Definition at line 241 of file SessionsStore.cpp.
Referenced by DBHandler::resetSessionsStore().
void SessionsStore::disconnect | ( | const std::string | session_id | ) |
Definition at line 54 of file SessionsStore.cpp.
References eraseUnlocked(), getDisconnectCallback(), getLock(), getUnlocked(), logger::INFO, and LOG.
void SessionsStore::erase | ( | const std::string & | session_id | ) |
Definition at line 37 of file SessionsStore.cpp.
References eraseUnlocked(), and getLock().
void SessionsStore::eraseByDB | ( | const std::string & | db_name | ) |
Definition at line 48 of file SessionsStore.cpp.
References eraseIf().
void SessionsStore::eraseByUser | ( | const std::string & | user_name | ) |
Definition at line 42 of file SessionsStore.cpp.
References eraseIf().
|
protectedpure virtual |
Implemented in CachedSessionStore.
Referenced by eraseByDB(), and eraseByUser().
|
protectedpure virtual |
Implemented in CachedSessionStore.
Referenced by disconnect(), and erase().
|
pure virtual |
Implemented in CachedSessionStore.
std::vector< SessionInfoPtr > SessionsStore::getAllSessions | ( | ) |
Definition at line 93 of file SessionsStore.cpp.
References getIf().
SessionInfoPtr SessionsStore::getByPublicID | ( | const std::string & | public_id | ) |
Definition at line 103 of file SessionsStore.cpp.
References CHECK_EQ, and getIf().
|
protectedpure virtual |
Implemented in CachedSessionStore.
Referenced by disconnect().
|
protectedpure virtual |
Implemented in CachedSessionStore.
Referenced by getAllSessions(), getByPublicID(), and getUserSessions().
|
protectedpure virtual |
Implemented in CachedSessionStore.
Referenced by disconnect(), and erase().
SessionInfo SessionsStore::getSessionCopy | ( | const std::string & | session_id | ) |
Definition at line 28 of file SessionsStore.cpp.
|
protectedpure virtual |
Implemented in CachedSessionStore.
Referenced by disconnect().
std::vector< SessionInfoPtr > SessionsStore::getUserSessions | ( | const std::string & | user_name | ) |
Definition at line 97 of file SessionsStore.cpp.
References getIf().
|
protected |
Definition at line 67 of file SessionsStore.cpp.
References logger::INFO, isSessionInUse(), LOG, and run_benchmark_import::start_time.
Referenced by CachedSessionStore::get().
|
protectedpure virtual |
Implemented in CachedSessionStore.
Referenced by isSessionExpired().