Class PreloadContext
Defined in File preload_context.hpp
Class Documentation
-
class gkfs::preload::PreloadContext
Singleton class of the client context with all relevant global data
Public Functions
-
PreloadContext(PreloadContext const&) = delete
-
void operator=(PreloadContext const&) = delete
-
void init_logging()
-
void mountdir(const std::string &path)
-
const std::string &mountdir() const
-
const std::vector<std::string> &mountdir_components() const
-
void cwd(const std::string &path)
-
const std::string &cwd() const
-
const std::vector<hermes::endpoint> &hosts() const
-
void hosts(const std::vector<hermes::endpoint> &addrs)
-
void clear_hosts()
-
uint64_t local_host_id() const
-
void local_host_id(uint64_t id)
-
uint64_t fwd_host_id() const
-
void fwd_host_id(uint64_t id)
-
const std::string &rpc_protocol() const
-
void rpc_protocol(const std::string &rpc_protocol)
-
bool auto_sm() const
-
void auto_sm(bool auto_sm)
-
RelativizeStatus relativize_fd_path(int dirfd, const char *raw_path, std::string &relative_path, int flags = 0, bool resolve_last_link = true) const
-
bool relativize_path(const char *raw_path, std::string &relative_path, bool resolve_last_link = true) const
-
const std::shared_ptr<gkfs::filemap::OpenFileMap> &file_map() const
-
std::shared_ptr<gkfs::rpc::Distributor> distributor() const
-
void enable_interception()
-
void disable_interception()
-
bool interception_enabled() const
-
int register_internal_fd(int fd)
-
void unregister_internal_fd(int fd)
-
bool is_internal_fd(int fd) const
-
void protect_user_fds()
-
void unprotect_user_fds()
-
std::string get_hostname()
Public Static Functions
-
static inline PreloadContext *getInstance()
Private Functions
-
PreloadContext()
Private Members
-
std::shared_ptr<gkfs::filemap::OpenFileMap> ofm_
-
std::shared_ptr<gkfs::rpc::Distributor> distributor_
-
std::string cwd_
-
std::vector<std::string> mountdir_components_
-
std::string mountdir_
-
std::vector<hermes::endpoint> hosts_
-
uint64_t local_host_id_
-
uint64_t fwd_host_id_
-
std::string rpc_protocol_
-
bool auto_sm_ = {false}
-
bool interception_enabled_
-
std::bitset<GKFS_MAX_INTERNAL_FDS> internal_fds_
-
mutable std::mutex internal_fds_mutex_
-
bool internal_fds_must_relocate_
-
std::bitset<MAX_USER_FDS> protected_fds_
-
std::string hostname
Private Static Attributes
-
static constexpr auto MIN_INTERNAL_FD = GKFS_MAX_OPEN_FDS - GKFS_MAX_INTERNAL_FDS
-
static constexpr auto MAX_USER_FDS = MIN_INTERNAL_FD
-
PreloadContext(PreloadContext const&) = delete