xrootd
Loading...
Searching...
No Matches
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)
 
 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 (const Timeout &timeout, std::promise< XRootDStatus > prms, std::function< void(const XRootDStatus &)> final, Operation< true > *opr)
 
void Assign (std::function< void(const XRootDStatus &)> final)
 Assign the finalization routine.
 
void PreparePipelineStart ()
 Called by a pipeline on the handler of its first operation before Run.
 
- Public Member Functions inherited from XrdCl::ResponseHandler
virtual ~ResponseHandler ()
 

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

std::unique_ptr< ResponseHandlerresponseHandler
 The handler of our operation.
 
std::unique_ptr< Operation< true > > currentOperation
 The operation the handler is assigned to.
 
std::unique_ptr< Operation< true > > nextOperation
 Next operation in the pipeline.
 
Timeout timeout
 Pipeline timeout.
 
std::promise< XRootDStatusprms
 The promise that there will be a result (traveling along the pipeline)
 
std::function< void(const XRootDStatus &)> final
 

Friends

template<bool >
class Operation
 

Additional Inherited Members

- Static Public Member Functions inherited from XrdCl::ResponseHandler
static ResponseHandlerWrap (std::function< void(XRootDStatus &, AnyObject &)> func)
 
static ResponseHandlerWrap (std::function< void(XRootDStatus *, AnyObject *)> func)
 

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)

Constructor.

Parameters
handler: the handler of our operation

◆ PipelineHandler() [2/2]

XrdCl::PipelineHandler::PipelineHandler ( )
inline

Default Constructor.

◆ ~PipelineHandler()

XrdCl::PipelineHandler::~PipelineHandler ( )
inline

Destructor.

Member Function Documentation

◆ AddOperation()

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

Add new operation to the pipeline

Parameters
operation: operation to add

◆ Assign() [1/2]

void XrdCl::PipelineHandler::Assign ( const Timeout timeout,
std::promise< XRootDStatus prms,
std::function< void(const XRootDStatus &)>  final,
Operation< true > *  opr 
)

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

◆ Assign() [2/2]

void XrdCl::PipelineHandler::Assign ( std::function< void(const XRootDStatus &)>  final)

Assign the finalization routine.

◆ 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.

◆ PreparePipelineStart()

void XrdCl::PipelineHandler::PreparePipelineStart ( )

Called by a pipeline on the handler of its first operation before Run.

Referenced by XrdCl::Pipeline::Run().

Friends And Related Symbol Documentation

◆ Operation

template<bool >
friend class Operation
friend

Member Data Documentation

◆ currentOperation

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

The operation the handler is assigned to.

◆ 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.

◆ prms

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

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

◆ responseHandler

std::unique_ptr<ResponseHandler> XrdCl::PipelineHandler::responseHandler
private

The handler of our operation.

◆ timeout

Timeout XrdCl::PipelineHandler::timeout
private

Pipeline timeout.


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