8 #ifndef SRC_XRDCL_XRDCLREDIRECTORREGISTRY_HH_
9 #define SRC_XRDCL_XRDCLREDIRECTORREGISTRY_HH_
49 virtual void Run(
void *arg );
53 std::shared_ptr<Message> msg;
90 virtual std::string
GetCheckSum(
const std::string &type )
const = 0;
155 typedef std::map< std::string, std::pair<VirtualRedirector*, size_t> > RedirectorMap;
168 static URL ConvertLocalfile(
const URL &url );
185 RedirectorMap pRegistry;
Interface for a job to be run by the job manager.
The message representation used throughout the system.
A job class for redirect handling in the thread-pool.
virtual ~RedirectJob()
Destructor.
RedirectJob(MsgHandler *handler, std::shared_ptr< Message > msg)
Constructor.
virtual void Run(void *arg)
Run the user handler.
Singleton access to URL to virtual redirector mapping.
~RedirectorRegistry()
Destructor.
static RedirectorRegistry & Instance()
Returns reference to the single instance.
void Release(const URL &url)
Release the virtual redirector associated with the given URL.
XRootDStatus RegisterAndWait(const URL &url)
Creates a new virtual redirector and registers it (sync).
VirtualRedirector * Get(const URL &url) const
Get a virtual redirector associated with the given URL.
XRootDStatus Register(const URL &url)
Creates a new virtual redirector and registers it (async).
Handle an async response.
An interface for metadata redirectors.
virtual long long GetSize() const =0
virtual const std::vector< std::string > & GetReplicas()=0
Returns a vector with replicas as given in the meatlink file.
virtual XRootDStatus Load(ResponseHandler *userHandler)=0
Initializes the object with the content of the metalink file.
virtual std::string GetCheckSum(const std::string &type) const =0
virtual int Count(Message &req) const =0
Count how many replicas do we have left to try for given request.
virtual std::string GetTargetName() const =0
Gets the file name as specified in the metalink.
virtual std::vector< std::string > GetSupportedCheckSums() const =0
virtual ~VirtualRedirector()
Destructor.
virtual XRootDStatus HandleRequest(const Message *msg, MsgHandler *handler)=0