XRootD
Loading...
Searching...
No Matches
XrdCl::FileSystemData Struct Reference
+ Collaboration diagram for XrdCl::FileSystemData:

Public Member Functions

 FileSystemData (const URL &url)
 
void AssignLastURL (const URL &url)
 
void AssignLoadBalancer (const URL &url)
 

Static Public Member Functions

static XRootDStatus Send (std::shared_ptr< FileSystemData > &fs, Message *msg, ResponseHandler *handler, MessageSendParams &params)
 

Public Attributes

bool pFollowRedirects
 
std::unique_ptr< URLpLastUrl
 
bool pLoadBalancerLookupDone
 
XrdSysMutex pMutex
 
std::unique_ptr< URLpUrl
 

Detailed Description

Definition at line 927 of file XrdClFileSystem.cc.

Constructor & Destructor Documentation

◆ FileSystemData()

XrdCl::FileSystemData::FileSystemData ( const URL & url)
inline

Definition at line 929 of file XrdClFileSystem.cc.

929 :
931 pFollowRedirects( true ),
932 pUrl( new URL( url.GetURL() ) )
933 {
934 }
std::unique_ptr< URL > pUrl

References pFollowRedirects, pLoadBalancerLookupDone, and pUrl.

Member Function Documentation

◆ AssignLastURL()

void XrdCl::FileSystemData::AssignLastURL ( const URL & url)
inline

Definition at line 993 of file XrdClFileSystem.cc.

994 {
995 Log *log = DefaultEnv::GetLog();
996 XrdSysMutexHelper scopedLock( pMutex );
997
998 log->Dump( FileSystemMsg, "[%p@%s] Assigning %s as last URL", this,
999 pUrl->GetHostId().c_str(), url.GetHostId().c_str() );
1000
1001 pLastUrl.reset( new URL( url ) );
1002 }
static Log * GetLog()
Get default log.
const uint64_t FileSystemMsg
XrdSysError Log
Definition XrdConfig.cc:113
std::unique_ptr< URL > pLastUrl

References XrdCl::Log::Dump(), XrdCl::FileSystemMsg, XrdCl::URL::GetHostId(), XrdCl::DefaultEnv::GetLog(), pLastUrl, pMutex, and pUrl.

+ Here is the call graph for this function:

◆ AssignLoadBalancer()

void XrdCl::FileSystemData::AssignLoadBalancer ( const URL & url)
inline

Definition at line 975 of file XrdClFileSystem.cc.

976 {
977 Log *log = DefaultEnv::GetLog();
978 XrdSysMutexHelper scopedLock( pMutex );
979
981 return;
982
983 log->Dump( FileSystemMsg, "[%p@%s] Assigning %s as load balancer", this,
984 pUrl->GetHostId().c_str(), url.GetHostId().c_str() );
985
986 pUrl.reset( new URL( url ) );
988 }

References XrdCl::Log::Dump(), XrdCl::FileSystemMsg, XrdCl::URL::GetHostId(), XrdCl::DefaultEnv::GetLog(), pLoadBalancerLookupDone, pMutex, and pUrl.

+ Here is the call graph for this function:

◆ Send()

static XRootDStatus XrdCl::FileSystemData::Send ( std::shared_ptr< FileSystemData > & fs,
Message * msg,
ResponseHandler * handler,
MessageSendParams & params )
inlinestatic

Definition at line 939 of file XrdClFileSystem.cc.

943 {
944 Log *log = DefaultEnv::GetLog();
945 XrdSysMutexHelper scopedLock( fs->pMutex );
946
947 log->Dump( FileSystemMsg, "[%p@%s] Sending %s", fs.get(),
948 fs->pUrl->GetHostId().c_str(), msg->GetObfuscatedDescription().c_str() );
949
950 AssignLastURLHandler *lastUrlHandler = new AssignLastURLHandler( fs, handler );
951 handler = lastUrlHandler;
952
953 AssignLBHandler *lbHandler = nullptr;
954 if( !fs->pLoadBalancerLookupDone && fs->pFollowRedirects )
955 {
956 lbHandler = new AssignLBHandler( fs, handler );
957 handler = lbHandler;
958 }
959
960 params.followRedirects = fs->pFollowRedirects;
961
962 auto st = MessageUtils::SendMessage( *fs->pUrl, msg, handler, params, 0 );
963 if( !st.IsOK() )
964 {
965 delete lastUrlHandler;
966 delete lbHandler;
967 }
968
969 return st;
970 }
static XRootDStatus SendMessage(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Send message.

References XrdCl::Log::Dump(), XrdCl::FileSystemMsg, XrdCl::MessageSendParams::followRedirects, XrdCl::DefaultEnv::GetLog(), XrdCl::Message::GetObfuscatedDescription(), XrdCl::Status::IsOK(), and XrdCl::MessageUtils::SendMessage().

Referenced by XrdCl::FileSystem::ChMod(), XrdCl::FileSystem::DirList(), XrdCl::FileSystem::Locate(), XrdCl::FileSystem::MkDir(), XrdCl::FileSystem::Mv(), XrdCl::FileSystem::Ping(), XrdCl::FileSystem::Prepare(), XrdCl::FileSystem::Protocol(), XrdCl::FileSystem::Query(), XrdCl::FileSystem::Rm(), XrdCl::FileSystem::RmDir(), XrdCl::FileSystem::Stat(), XrdCl::FileSystem::StatVFS(), and XrdCl::FileSystem::Truncate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ pFollowRedirects

bool XrdCl::FileSystemData::pFollowRedirects

Definition at line 1006 of file XrdClFileSystem.cc.

Referenced by FileSystemData().

◆ pLastUrl

std::unique_ptr<URL> XrdCl::FileSystemData::pLastUrl

Definition at line 1008 of file XrdClFileSystem.cc.

Referenced by AssignLastURL().

◆ pLoadBalancerLookupDone

bool XrdCl::FileSystemData::pLoadBalancerLookupDone

Definition at line 1005 of file XrdClFileSystem.cc.

Referenced by FileSystemData(), and AssignLoadBalancer().

◆ pMutex

XrdSysMutex XrdCl::FileSystemData::pMutex

Definition at line 1004 of file XrdClFileSystem.cc.

Referenced by AssignLastURL(), and AssignLoadBalancer().

◆ pUrl

std::unique_ptr<URL> XrdCl::FileSystemData::pUrl

Definition at line 1007 of file XrdClFileSystem.cc.

Referenced by FileSystemData(), AssignLastURL(), and AssignLoadBalancer().


The documentation for this struct was generated from the following file: