1 #ifndef Utilities_XrdAdaptor_XrdSource_h
2 #define Utilities_XrdAdaptor_XrdSource_h
7 #include <boost/utility.hpp>
15 namespace XrdAdaptor {
19 class XrdSiteStatistics;
20 class XrdStatisticsService;
22 class Source :
public std::enable_shared_from_this<Source>, boost::noncopyable {
29 void handle(std::shared_ptr<ClientRequest>);
31 void handle(RequestList &);
71 std::shared_ptr<XrdCl::File>
m_fh;
73 std::unique_ptr<QualityMetricSource>
m_qm;
74 std::shared_ptr<XrdSiteStatistics>
m_stats;
static bool getXrootdSite(XrdCl::File &file, std::string &site)
struct timespec m_lastDowngrade
struct timespec getLastDowngrade() const
static void determineHostExcludeString(XrdCl::File &file, const XrdCl::HostList *hostList, std::string &exclude)
void handle(std::shared_ptr< ClientRequest >)
std::shared_ptr< XrdCl::File > m_fh
void setLastDowngrade(struct timespec now)
const std::string & PrettyID() const
static bool getDomain(const std::string &host, std::string &domain)
static bool isDCachePool(XrdCl::File &file, const XrdCl::HostList *hostList=nullptr)
Source(timespec now, std::unique_ptr< XrdCl::File > fileHandle, const std::string &exclude)
std::unique_ptr< QualityMetricSource > m_qm
const std::string & Site() const
std::shared_ptr< XrdSiteStatistics > m_stats
std::shared_ptr< XrdCl::File > getFileHandle()
static bool getXrootdSiteFromURL(std::string url, std::string &site)
const std::string & ExcludeID() const
static bool getHostname(const std::string &id, std::string &hostname)
const std::string & ID() const