11 #include "XrdCl/XrdClDefaultEnv.hh"
12 #include "XrdNet/XrdNetUtils.hh"
21 XrdCl::AnyObject *response )
23 if (response)
delete response;
41 XrdCl::Env *
env = XrdCl::DefaultEnv::GetEnv();
44 env->PutString(
"NetworkStack",
"IPAuto");
46 XrdNetUtils::SetAuto(XrdNetUtils::prefAuto);
72 auto file = std::make_unique<XrdFile>(fullpath,
mode);
83 XrdCl::URL
url(fullpath);
84 XrdCl::FileSystem fs(url);
85 std::vector<std::string> fileList; fileList.push_back(url.GetPath());
86 fs.Prepare(fileList, XrdCl::PrepareFlags::Stage, 0, &
m_null_handler);
98 XrdCl::URL
url(fullpath);
99 XrdCl::FileSystem fs(url);
101 XrdCl::StatInfo *stat;
102 if (!(fs.Stat(url.GetPath(), stat)).IsOK() || (stat ==
nullptr))
114 if(level == oldLevel) {
117 std::lock_guard<std::mutex> guard(
m_envMutex);
128 XrdCl::DefaultEnv::SetLogLevel(
"Warning");
131 XrdCl::DefaultEnv::SetLogLevel(
"Info");
134 XrdCl::DefaultEnv::SetLogLevel(
"Debug");
137 XrdCl::DefaultEnv::SetLogLevel(
"Dump");
140 XrdCl::DefaultEnv::SetLogLevel(
"Dump");
144 ex <<
"Invalid log level specified " <<
level;
145 ex.
addContext(
"Calling XrdStorageMaker::setDebugLevel()");
156 if (oldTimeout == timeout) {
160 std::lock_guard<std::mutex> guard(
m_envMutex);
166 XrdCl::Env *
env = XrdCl::DefaultEnv::GetEnv();
169 env->PutInt(
"StreamTimeout", timeout);
170 env->PutInt(
"RequestTimeout", timeout);
171 env->PutInt(
"ConnectionWindow", timeout);
172 env->PutInt(
"StreamErrorWindow", timeout);
176 env->PutInt(
"ConnectionWindow", timeout/6+1);
177 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