xrootd
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
XrdCl::PipelineHandler Class Reference

#include <XrdClOperations.hh>

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

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Friends

template<bool >
class Operation
 

Detailed Description

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

Constructor & Destructor Documentation

◆ PipelineHandler() [1/2]

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

◆ PipelineHandler() [2/2]

XrdCl::PipelineHandler::PipelineHandler ( )

Default Constructor.

◆ ~PipelineHandler()

XrdCl::PipelineHandler::~PipelineHandler ( )

Destructor.

Member Function Documentation

◆ AddOperation()

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

Add new operation to the pipeline

Parameters
operation: operation to add

◆ Assign()

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

◆ dealloc()

void XrdCl::PipelineHandler::dealloc ( XRootDStatus status,
AnyObject response,
HostList hostList 
)
inlineprivate

◆ HandleResponse()

void XrdCl::PipelineHandler::HandleResponse ( XRootDStatus status,
AnyObject response 
)
virtual

Callback function.

Reimplemented from XrdCl::ResponseHandler.

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

◆ HandleResponseImpl()

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

Callback function implementation;.

◆ HandleResponseWithHosts()

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

Callback function.

Reimplemented from XrdCl::ResponseHandler.

Friends And Related Function Documentation

◆ Operation

template<bool >
friend class Operation
friend

Member Data Documentation

◆ final

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)

◆ nextOperation

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

Next operation in the pipeline.

◆ ownHandler

bool XrdCl::PipelineHandler::ownHandler
private

true, if we own the handler

◆ prms

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

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

◆ responseHandler

ResponseHandler* XrdCl::PipelineHandler::responseHandler
private

The handler of our operation.


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