![]() |
XRootD
|
#include <XrdClMetalinkRedirector.hh>
Public Member Functions | |
MetalinkRedirector (const std::string &url) | |
virtual | ~MetalinkRedirector () |
Destructor. More... | |
virtual int | Count (Message &req) const |
Count how many replicas do we have left to try for given request. More... | |
std::string | GetCheckSum (const std::string &type) const |
const std::vector< std::string > & | GetReplicas () |
Returns a vector with replicas as given in the meatlink file. More... | |
long long | GetSize () const |
std::vector< std::string > | GetSupportedCheckSums () const |
std::string | GetTargetName () const |
Gets the file name as specified in the metalink. More... | |
XRootDStatus | HandleRequest (const Message *msg, MsgHandler *handler) |
XRootDStatus | Load (ResponseHandler *userHandler) |
![]() | |
virtual | ~VirtualRedirector () |
Destructor. More... | |
Friends | |
class | MetalinkOpenHandler |
class | MetalinkReadHandler |
An abstraction representing a virtual redirector based on a metalink file
Definition at line 31 of file XrdClMetalinkRedirector.hh.
XrdCl::MetalinkRedirector::MetalinkRedirector | ( | const std::string & | url | ) |
Constructor
url | : URL to the metalink file |
Definition at line 218 of file XrdClMetalinkRedirector.cc.
|
virtual |
Destructor.
Definition at line 227 of file XrdClMetalinkRedirector.cc.
|
virtual |
Count how many replicas do we have left to try for given request.
Implements XrdCl::VirtualRedirector.
Definition at line 399 of file XrdClMetalinkRedirector.cc.
|
inlinevirtual |
Returns the checksum of the given type if specified in the metalink file, or an empty string otherwise
Implements XrdCl::VirtualRedirector.
Definition at line 73 of file XrdClMetalinkRedirector.hh.
|
inlinevirtual |
Returns a vector with replicas as given in the meatlink file.
Implements XrdCl::VirtualRedirector.
Definition at line 109 of file XrdClMetalinkRedirector.hh.
|
inlinevirtual |
Returns the file size if specified in the metalink file, otherwise a negative number
Implements XrdCl::VirtualRedirector.
Definition at line 101 of file XrdClMetalinkRedirector.hh.
|
inlinevirtual |
Returns the first (in alphabetical order) checksum type available in the metalink file, if no checksum is available returns an empty string
Implements XrdCl::VirtualRedirector.
Definition at line 85 of file XrdClMetalinkRedirector.hh.
|
inlinevirtual |
Gets the file name as specified in the metalink.
Implements XrdCl::VirtualRedirector.
Definition at line 64 of file XrdClMetalinkRedirector.hh.
|
virtual |
If the MetalinkRedirector is initialized creates an instant redirect response, otherwise queues the request until initialization is done.
Implements XrdCl::VirtualRedirector.
Definition at line 381 of file XrdClMetalinkRedirector.cc.
|
virtual |
Initializes the object with the content of the metalink file
userHandler | : the response handler provided by end user |
Implements XrdCl::VirtualRedirector.
Definition at line 235 of file XrdClMetalinkRedirector.cc.
References XrdCl::Status::IsOK(), MetalinkOpenHandler, XrdCl::Access::None, XrdCl::File::Open(), and XrdCl::OpenFlags::Read.
|
friend |
Definition at line 33 of file XrdClMetalinkRedirector.hh.
Referenced by Load().
|
friend |
Definition at line 34 of file XrdClMetalinkRedirector.hh.