xrootd
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
XrdCl::ParallelOperation< HasHndl >::Ctx Struct Reference
Collaboration diagram for XrdCl::ParallelOperation< HasHndl >::Ctx:
Collaboration graph
[legend]

Public Member Functions

 Ctx (PipelineHandler *handler, PolicyExecutor *policy)
 
 ~Ctx ()
 Destructor.
 
void Examine (const XRootDStatus &st)
 
void Handle (const XRootDStatus &st)
 

Public Attributes

std::atomic< PipelineHandler * > handler
 PipelineHandler of the ParallelOperation.
 
std::unique_ptr< PolicyExecutorpolicy
 Policy defining when the user handler should be called.
 
barrier_t barrier
 

Detailed Description

template<bool HasHndl>
struct XrdCl::ParallelOperation< HasHndl >::Ctx

Helper class for handling the PipelineHandler of the ParallelOperation (RAII).

Guarantees that the handler will be executed exactly once.

Constructor & Destructor Documentation

◆ Ctx()

template<bool HasHndl>
XrdCl::ParallelOperation< HasHndl >::Ctx::Ctx ( PipelineHandler handler,
PolicyExecutor policy 
)
inline

Constructor.

Parameters
handler: the PipelineHandler of the Parallel operation

◆ ~Ctx()

template<bool HasHndl>
XrdCl::ParallelOperation< HasHndl >::Ctx::~Ctx ( )
inline

Member Function Documentation

◆ Examine()

template<bool HasHndl>
void XrdCl::ParallelOperation< HasHndl >::Ctx::Examine ( const XRootDStatus st)
inline

Forwards the status to the PipelineHandler if the handler haven't been called yet.

Parameters
st: status

References XrdCl::ParallelOperation< HasHndl >::Ctx::Handle(), and XrdCl::ParallelOperation< HasHndl >::Ctx::policy.

◆ Handle()

template<bool HasHndl>
void XrdCl::ParallelOperation< HasHndl >::Ctx::Handle ( const XRootDStatus st)
inline

Member Data Documentation

◆ barrier

template<bool HasHndl>
barrier_t XrdCl::ParallelOperation< HasHndl >::Ctx::barrier

wait barrier that assures handler is called only after RunImpl started all pipelines

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

◆ handler

template<bool HasHndl>
std::atomic<PipelineHandler*> XrdCl::ParallelOperation< HasHndl >::Ctx::handler

◆ policy

template<bool HasHndl>
std::unique_ptr<PolicyExecutor> XrdCl::ParallelOperation< HasHndl >::Ctx::policy

Policy defining when the user handler should be called.

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


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