12 #include "XrdCl/XrdClDefaultEnv.hh"
13 #include "XrdNet/XrdNetUtils.hh"
22 XrdCl::AnyObject *response )
44 XrdCl::Env *
env = XrdCl::DefaultEnv::GetEnv();
47 env->PutString(
"NetworkStack",
"IPAuto");
49 XrdNetUtils::SetAuto(XrdNetUtils::prefAuto);
75 auto file = std::make_unique<XrdFile>(fullpath,
mode);
87 XrdCl::FileSystem fs(url);
88 std::vector<std::string> fileList; fileList.push_back(url.GetPath());
92 edm::LogWarning(
"StageInError") <<
"XrdCl::FileSystem::Prepare failed with error '"
93 <<
status.ToStr() <<
"' (errNo = " <<
status.errNo <<
")";
107 XrdCl::FileSystem fs(url);
109 XrdCl::StatInfo *stat;
110 if (!(fs.Stat(url.GetPath(), stat)).IsOK() || (stat ==
nullptr))
122 if(level == oldLevel) {
125 std::lock_guard<std::mutex> guard(
m_envMutex);
136 XrdCl::DefaultEnv::SetLogLevel(
"Warning");
139 XrdCl::DefaultEnv::SetLogLevel(
"Info");
142 XrdCl::DefaultEnv::SetLogLevel(
"Debug");
145 XrdCl::DefaultEnv::SetLogLevel(
"Dump");
148 XrdCl::DefaultEnv::SetLogLevel(
"Dump");
152 ex <<
"Invalid log level specified " <<
level;
153 ex.
addContext(
"Calling XrdStorageMaker::setDebugLevel()");
164 if (oldTimeout == timeout) {
168 std::lock_guard<std::mutex> guard(
m_envMutex);
174 XrdCl::Env *
env = XrdCl::DefaultEnv::GetEnv();
177 env->PutInt(
"StreamTimeout", timeout);
178 env->PutInt(
"RequestTimeout", timeout);
179 env->PutInt(
"ConnectionWindow", timeout);
180 env->PutInt(
"StreamErrorWindow", timeout);
184 env->PutInt(
"ConnectionWindow", timeout/6+1);
185 env->PutInt(
"ConnectionRetry", 2);
CacheHint cacheHint(void) const
std::unique_ptr< Storage > wrapNonLocalFile(std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const
std::atomic< unsigned int > m_lastDebugLevel
static boost::mutex mutex
MakerResponseHandler m_null_handler
virtual void stagein(const std::string &proto, const std::string &path, const AuxSettings &aux) const override
static const StorageFactory * get(void)
void setTimeout(unsigned int timeout) const
std::atomic< unsigned int > m_lastTimeout
virtual void HandleResponse(XrdCl::XRootDStatus *status, XrdCl::AnyObject *response)
virtual bool check(const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=0) const override
#define DEFINE_FWK_SERVICE(type)
static const unsigned int XRD_DEFAULT_TIMEOUT
ReadHint readHint(void) const
void addContext(std::string const &context)
#define DEFINE_EDM_PLUGIN(factory, type, name)
tuple size
Write out results.
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &aux) const override
void setDebugLevel(unsigned int level) const