#include <XrdThrottleManager.hh>
Public Member Functions | |
| XrdThrottleManager (XrdSysError *lP, XrdOucTrace *tP) | |
| ~XrdThrottleManager () | |
| void | Apply (int reqsize, int reqops, int uid) |
| bool | CheckLoadShed (const std::string &opaque) |
| bool | CloseFile (const std::string &entity) |
| void | FromConfig (XrdThrottle::Configuration &config) |
| std::tuple< std::string, uint16_t > | GetUserInfo (const XrdSecEntity *client) |
| unsigned long | GetUserMaxConn (const std::string &username) |
| void | Init () |
| bool | IsThrottling () |
| int | LoadUserLimits (const std::string &config_file) |
| bool | OpenFile (const std::string &entity, std::string &open_error_message) |
| void | PerformLoadShed (const std::string &opaque, std::string &host, unsigned &port) |
| void | PrepLoadShed (const char *opaque, std::string &lsOpaque) |
| int | ReloadUserLimits () |
| void | SetLoadShed (std::string &hostname, unsigned port, unsigned frequency) |
| void | SetMaxConns (unsigned long max_conns) |
| void | SetMaxOpen (unsigned long max_open) |
| void | SetMaxWait (unsigned long max_wait) |
| void | SetMonitor (XrdXrootdGStream *gstream) |
| void | SetThrottles (float reqbyterate, float reqoprate, int concurrency, float interval_length) |
| XrdThrottleTimer | StartIOTimer (uint16_t uid, bool &ok) |
Protected Member Functions | |
| void | StopIOTimer (std::chrono::steady_clock::duration &event_duration, uint16_t uid) |
Friends | |
| class | XrdThrottleTimer |
Definition at line 54 of file XrdThrottleManager.hh.
| XrdThrottleManager::XrdThrottleManager | ( | XrdSysError * | lP, |
| XrdOucTrace * | tP ) |
Definition at line 46 of file XrdThrottleManager.cc.
|
inline |
Definition at line 119 of file XrdThrottleManager.hh.
| void XrdThrottleManager::Apply | ( | int | reqsize, |
| int | reqops, | ||
| int | uid ) |
Definition at line 342 of file XrdThrottleManager.cc.
| bool XrdThrottleManager::CheckLoadShed | ( | const std::string & | opaque | ) |
Definition at line 794 of file XrdThrottleManager.cc.
| bool XrdThrottleManager::CloseFile | ( | const std::string & | entity | ) |
Definition at line 276 of file XrdThrottleManager.cc.
References XrdSysThread::Num(), and TRACE.
| void XrdThrottleManager::FromConfig | ( | XrdThrottle::Configuration & | config | ) |
Definition at line 61 of file XrdThrottleManager.cc.
References XrdThrottle::Configuration::GetLoadshedFreq(), XrdThrottle::Configuration::GetLoadshedHost(), XrdThrottle::Configuration::GetLoadshedPort(), XrdThrottle::Configuration::GetMaxConn(), XrdThrottle::Configuration::GetMaxOpen(), XrdThrottle::Configuration::GetMaxWait(), XrdThrottle::Configuration::GetThrottleConcurrency(), XrdThrottle::Configuration::GetThrottleDataRate(), XrdThrottle::Configuration::GetThrottleIOPSRate(), XrdThrottle::Configuration::GetThrottleRecomputeIntervalMS(), XrdThrottle::Configuration::GetTraceLevels(), XrdThrottle::Configuration::GetUserConfigFile(), LoadUserLimits(), SetLoadShed(), SetMaxConns(), SetMaxOpen(), SetMaxWait(), and SetThrottles().
| std::tuple< std::string, uint16_t > XrdThrottleManager::GetUserInfo | ( | const XrdSecEntity * | client | ) |
Definition at line 129 of file XrdThrottleManager.cc.
References XrdSecEntity::eaAPI, XrdSecEntityAttr::Get(), XrdSecEntity::name, and XrdSecEntity::vorg.
| unsigned long XrdThrottleManager::GetUserMaxConn | ( | const std::string & | username | ) |
Definition at line 957 of file XrdThrottleManager.cc.
Referenced by OpenFile().
| void XrdThrottleManager::Init | ( | ) |
Definition at line 100 of file XrdThrottleManager.cc.
References DEBUG, XrdSysThread::Run(), and TRACE.
|
inline |
Definition at line 70 of file XrdThrottleManager.hh.
| int XrdThrottleManager::LoadUserLimits | ( | const std::string & | config_file | ) |
Definition at line 881 of file XrdThrottleManager.cc.
Referenced by FromConfig(), and ReloadUserLimits().
| bool XrdThrottleManager::OpenFile | ( | const std::string & | entity, |
| std::string & | open_error_message ) |
Definition at line 192 of file XrdThrottleManager.cc.
References GetUserMaxConn(), XrdSysThread::Num(), and TRACE.
| void XrdThrottleManager::PerformLoadShed | ( | const std::string & | opaque, |
| std::string & | host, | ||
| unsigned & | port ) |
Definition at line 840 of file XrdThrottleManager.cc.
| void XrdThrottleManager::PrepLoadShed | ( | const char * | opaque, |
| std::string & | lsOpaque ) |
Definition at line 816 of file XrdThrottleManager.cc.
References XrdOucEnv::Get().
| int XrdThrottleManager::ReloadUserLimits | ( | ) |
Definition at line 939 of file XrdThrottleManager.cc.
References LoadUserLimits().
|
inline |
Definition at line 81 of file XrdThrottleManager.hh.
Referenced by FromConfig().
|
inline |
Definition at line 86 of file XrdThrottleManager.hh.
Referenced by FromConfig().
|
inline |
Definition at line 84 of file XrdThrottleManager.hh.
Referenced by FromConfig().
|
inline |
Definition at line 88 of file XrdThrottleManager.hh.
Referenced by FromConfig().
|
inline |
Definition at line 101 of file XrdThrottleManager.hh.
|
inline |
Definition at line 77 of file XrdThrottleManager.hh.
Referenced by FromConfig().
| XrdThrottleTimer XrdThrottleManager::StartIOTimer | ( | uint16_t | uid, |
| bool & | ok ) |
Definition at line 728 of file XrdThrottleManager.cc.
References DEBUG, TRACE, and XrdThrottleTimer.
|
protected |
Definition at line 761 of file XrdThrottleManager.cc.
|
friend |
Definition at line 57 of file XrdThrottleManager.hh.
References XrdThrottleTimer.
Referenced by StartIOTimer(), and XrdThrottleTimer.