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 934 of file XrdClFileSystem.cc.

Constructor & Destructor Documentation

◆ FileSystemData()

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

Definition at line 936 of file XrdClFileSystem.cc.

936 :
938 pFollowRedirects( true ),
939 pUrl( new URL( url.GetURL() ) )
940 {
941 }
std::unique_ptr< URL > pUrl

Member Function Documentation

◆ AssignLastURL()

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

Definition at line 1000 of file XrdClFileSystem.cc.

1001 {
1002 Log *log = DefaultEnv::GetLog();
1003 XrdSysMutexHelper scopedLock( pMutex );
1004
1005 log->Dump( FileSystemMsg, "[%p@%s] Assigning %s as last URL", this,
1006 pUrl->GetHostId().c_str(), url.GetHostId().c_str() );
1007
1008 pLastUrl.reset( new URL( url ) );
1009 }
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 982 of file XrdClFileSystem.cc.

983 {
984 Log *log = DefaultEnv::GetLog();
985 XrdSysMutexHelper scopedLock( pMutex );
986
988 return;
989
990 log->Dump( FileSystemMsg, "[%p@%s] Assigning %s as load balancer", this,
991 pUrl->GetHostId().c_str(), url.GetHostId().c_str() );
992
993 pUrl.reset( new URL( url ) );
995 }

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 946 of file XrdClFileSystem.cc.

950 {
951 Log *log = DefaultEnv::GetLog();
952 XrdSysMutexHelper scopedLock( fs->pMutex );
953
954 log->Dump( FileSystemMsg, "[%p@%s] Sending %s", fs.get(),
955 fs->pUrl->GetHostId().c_str(), msg->GetObfuscatedDescription().c_str() );
956
957 AssignLastURLHandler *lastUrlHandler = new AssignLastURLHandler( fs, handler );
958 handler = lastUrlHandler;
959
960 AssignLBHandler *lbHandler = nullptr;
961 if( !fs->pLoadBalancerLookupDone && fs->pFollowRedirects )
962 {
963 lbHandler = new AssignLBHandler( fs, handler );
964 handler = lbHandler;
965 }
966
967 params.followRedirects = fs->pFollowRedirects;
968
969 auto st = MessageUtils::SendMessage( *fs->pUrl, msg, handler, params, 0 );
970 if( !st.IsOK() )
971 {
972 delete lastUrlHandler;
973 delete lbHandler;
974 }
975
976 return st;
977 }
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 1013 of file XrdClFileSystem.cc.

◆ pLastUrl

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

Definition at line 1015 of file XrdClFileSystem.cc.

Referenced by AssignLastURL().

◆ pLoadBalancerLookupDone

bool XrdCl::FileSystemData::pLoadBalancerLookupDone

Definition at line 1012 of file XrdClFileSystem.cc.

Referenced by AssignLoadBalancer().

◆ pMutex

XrdSysMutex XrdCl::FileSystemData::pMutex

Definition at line 1011 of file XrdClFileSystem.cc.

Referenced by AssignLastURL(), and AssignLoadBalancer().

◆ pUrl

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

Definition at line 1014 of file XrdClFileSystem.cc.

Referenced by AssignLastURL(), and AssignLoadBalancer().


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