Go to the source code of this file.
◆ DO_LOADSHED
Value:if (m_throttle.CheckLoadShed(m_loadshed)) \
{ \
unsigned port; \
std::string host; \
m_throttle.PerformLoadShed(m_loadshed, host, port); \
m_eroute.Emsg("File", "Performing load-shed for client", m_connection_id.c_str()); \
error.setErrInfo(port, host.c_str()); \
}
Definition at line 10 of file XrdThrottleFile.cc.
10#define DO_LOADSHED if (m_throttle.CheckLoadShed(m_loadshed)) \
11{ \
12 unsigned port; \
13 std::string host; \
14 m_throttle.PerformLoadShed(m_loadshed, host, port); \
15 m_eroute.Emsg("File", "Performing load-shed for client", m_connection_id.c_str()); \
16 error.setErrInfo(port, host.c_str()); \
17 return SFS_REDIRECT; \
18}
◆ DO_THROTTLE
| #define DO_THROTTLE |
( |
| amount | ) |
|
Value:DO_LOADSHED \
m_throttle.Apply(amount, 1, m_uid); \
bool ok; \
auto xtimer = m_throttle.StartIOTimer(m_uid, ok); \
if (!ok) { \
error.setErrInfo(EMFILE, "I/O limit exceeded and wait time hit"); \
}
Definition at line 20 of file XrdThrottleFile.cc.
20#define DO_THROTTLE(amount) \
21DO_LOADSHED \
22m_throttle.Apply(amount, 1, m_uid); \
23bool ok; \
24auto xtimer = m_throttle.StartIOTimer(m_uid, ok); \
25if (!ok) { \
26 error.setErrInfo(EMFILE, "I/O limit exceeded and wait time hit"); \
27 return SFS_ERROR; \
28}
Referenced by XrdThrottle::File::pgRead(), XrdThrottle::File::pgWrite(), XrdThrottle::File::read(), XrdThrottle::File::read(), XrdThrottle::File::SendData(), and XrdThrottle::File::write().