![SWC-DB logo](logo.svg) |
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
6 #ifndef swcdb_fsbroker_FsBrokerEnv_h
7 #define swcdb_fsbroker_FsBrokerEnv_h
16 namespace SWC {
namespace FsBroker {
18 class Fds final :
private std::unordered_map<int32_t, FS::SmartFd::Ptr> {
37 return it == cend() ? nullptr : it->second;
80 return m_env->_reporting;
85 return m_env->_resources;
90 return m_env->m_in_process;
95 m_env->m_in_process.fetch_add(count);
100 return m_env->_can_process();
104 return m_env->_shuttingdown();
146 std::this_thread::sleep_for(std::chrono::milliseconds(200));
158 if(fd->flags() & O_WRONLY)
175 inline static std::shared_ptr<FsBroker>
m_env =
nullptr;
193 for(
auto it = cbegin(); it != cend(); ++it) {
194 if(it->first !=
m_next_fd && it->second->fd() == smartfd->fd()) {
214 smartfd = std::move(it->second);
230 #endif // swcdb_fsbroker_FsBrokerEnv_h
FS::SmartFd::Ptr pop_next()
SWC::Config::Property::Value_int32_g cfg_ram_percent_allowed
#define SWC_LOGF(priority, fmt,...)
SWC_CAN_INLINE FS::SmartFd::Ptr select(int32_t fd) noexcept
SWC_CAN_INLINE bool _can_process() noexcept
static void reset() noexcept
FS::SmartFd::Ptr remove(int32_t fd)
SWC::FsBroker::Metric::Reporting::Ptr _reporting
static std::shared_ptr< FsBroker > m_env
constexpr SWC_CAN_INLINE void store(T v) noexcept
The SWC-DB C++ namespace 'SWC'.
static SWC_CAN_INLINE SWC::FsBroker::Metric::Reporting::Ptr & metrics_track() noexcept
static SWC_CAN_INLINE bool can_process() noexcept
SWC::Config::Property::Value_int32_g cfg_ram_percent_reserved
static SWC_CAN_INLINE int64_t in_process() noexcept
static SWC_CAN_INLINE FS::FileSystem::Ptr & fs() noexcept
Core::AtomicBool m_shuttingdown
static SWC_CAN_INLINE System::Resources & res() noexcept
std::shared_ptr< SmartFd > Ptr
Core::Atomic< int64_t > m_in_process
static SWC_CAN_INLINE void in_process(int64_t count) noexcept
constexpr SWC_CAN_INLINE T load() const noexcept
static void shuttingdown()
static SWC_CAN_INLINE SWC::FsBroker::Fds & fds() noexcept
System::Resources _resources
constexpr SWC_CAN_INLINE T fetch_add(T v) noexcept
std::shared_ptr< Reporting > Ptr
int32_t add(const FS::SmartFd::Ptr &smartfd)
SWC::Config::Property::Value_int32_g cfg_ram_release_rate