XrdCl::PipelineHandler Class Reference

#include <XrdClOperations.hh>

Inheritance diagram for XrdCl::PipelineHandler:
Inheritance graph
[legend]
Collaboration diagram for XrdCl::PipelineHandler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PipelineHandler (ResponseHandler *handler, bool own)
 PipelineHandler ()
 Default Constructor.
void HandleResponseWithHosts (XRootDStatus *status, AnyObject *response, HostList *hostList)
 Callback function.
void HandleResponse (XRootDStatus *status, AnyObject *response)
 Callback function.
 ~PipelineHandler ()
 Destructor.
void AddOperation (Operation< true > *operation)
void Assign (std::promise< XRootDStatus > prms, std::function< void(const XRootDStatus &)> final)

Private Member Functions

void HandleResponseImpl (XRootDStatus *status, AnyObject *response, HostList *hostList=nullptr)
 Callback function implementation;.
void dealloc (XRootDStatus *status, AnyObject *response, HostList *hostList)

Private Attributes

ResponseHandlerresponseHandler
 The handler of our operation.
bool ownHandler
 true, if we own the handler
std::unique_ptr< Operation
< true > > 
nextOperation
 Next operation in the pipeline.
std::promise< XRootDStatusprms
 The promise that there will be a result (traveling along the pipeline).
std::function< void(const
XRootDStatus &)> 
final

Friends

class Operation

Detailed Description

Wrapper for ResponseHandler, used only internally to run next operation after previous one is finished


Constructor & Destructor Documentation

XrdCl::PipelineHandler::PipelineHandler ( ResponseHandler handler,
bool  own 
)

Constructor.

Parameters:
handler : the handler of our operation
own : if true we have the ownership of handler (it's memory), and it is our responsibility to deallocate it
XrdCl::PipelineHandler::PipelineHandler (  ) 

Default Constructor.

XrdCl::PipelineHandler::~PipelineHandler (  ) 

Destructor.


Member Function Documentation

void XrdCl::PipelineHandler::AddOperation ( Operation< true > *  operation  ) 

Add new operation to the pipeline

Parameters:
operation : operation to add
void XrdCl::PipelineHandler::Assign ( std::promise< XRootDStatus prms,
std::function< void(const XRootDStatus &)>  final 
)

Set workflow to this and all next handlers. In the last handler it is used to finish workflow execution

Parameters:
prms : a promis that the pipeline will have a result
final : a callable that should be called at the end of pipeline
void XrdCl::PipelineHandler::dealloc ( XRootDStatus status,
AnyObject response,
HostList hostList 
) [inline, private]
void XrdCl::PipelineHandler::HandleResponse ( XRootDStatus status,
AnyObject response 
) [virtual]

Callback function.

Reimplemented from XrdCl::ResponseHandler.

Referenced by XrdCl::ParallelOperation< HasHndl >::Ctx::Handle().

void XrdCl::PipelineHandler::HandleResponseImpl ( XRootDStatus status,
AnyObject response,
HostList hostList = nullptr 
) [private]

Callback function implementation;.

void XrdCl::PipelineHandler::HandleResponseWithHosts ( XRootDStatus status,
AnyObject response,
HostList hostList 
) [virtual]

Callback function.

Reimplemented from XrdCl::ResponseHandler.


Friends And Related Function Documentation

friend class Operation [friend]

Member Data Documentation

std::function<void(const XRootDStatus&)> XrdCl::PipelineHandler::final [private]

The lambda/function/functor that should be called at the end of the pipeline (traveling along the pipeline)

std::unique_ptr<Operation<true> > XrdCl::PipelineHandler::nextOperation [private]

Next operation in the pipeline.

true, if we own the handler

std::promise<XRootDStatus> XrdCl::PipelineHandler::prms [private]

The promise that there will be a result (traveling along the pipeline).

The handler of our operation.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 13 May 2020 for xrootd by  doxygen 1.6.1