Loading...
Searching...
No Matches
XrdThrottleFile.cc File Reference
`#include "XrdSfs/XrdSfsAio.hh"`
`#include "XrdSec/XrdSecEntity.hh"`
`#include "XrdSec/XrdSecEntityAttr.hh"`
`#include "XrdThrottle.hh"`
Include dependency graph for XrdThrottleFile.cc:

Go to the source code of this file.

## Macros

#define | DO_LOADSHED
#define | DO_THROTTLE(amount)

## Macro Definition Documentation

## DO_LOADSHED

#define 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()); \
return SFS_REDIRECT; \
}
SFS_REDIRECT
#define SFS_REDIRECT
Definition XrdSfsInterface.hh:110

Definition at line 10 of file XrdThrottleFile.cc.

#define DO_LOADSHED 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()); \
return SFS_REDIRECT; \
}

## 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"); \
return SFS_ERROR; \
}
SFS_ERROR
#define SFS_ERROR
Definition XrdSfsInterface.hh:109

Definition at line 20 of file XrdThrottleFile.cc.

#define DO_THROTTLE(amount) \
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"); \
return SFS_ERROR; \
}

Referenced by XrdThrottle::File::pgRead(), XrdThrottle::File::pgWrite(), XrdThrottle::File::read(), XrdThrottle::File::read(), XrdThrottle::File::SendData(), and XrdThrottle::File::write().