xrootd
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
XrdCl::ParallelOperation< HasHndl > Class Template Reference

#include <XrdClParallelOperation.hh>

Inheritance diagram for XrdCl::ParallelOperation< HasHndl >:
Inheritance graph
[legend]
Collaboration diagram for XrdCl::ParallelOperation< HasHndl >:
Collaboration graph
[legend]

Classes

struct  AllPolicy
 
struct  AnyPolicy
 
struct  AtLeastPolicy
 
struct  barrier_t
 A wait barrier helper class. More...
 
struct  Ctx
 
struct  PipelineEnd
 The thread-pool job for schedule Ctx::Examine. More...
 
struct  SomePolicy
 

Public Member Functions

template<bool from>
 ParallelOperation (ParallelOperation< from > &&obj)
 Constructor: copy-move a ParallelOperation in different state.
 
template<class Container >
 ParallelOperation (Container &&container)
 
 ~ParallelOperation ()
 
std::string ToString ()
 
ParallelOperation< HasHndl > All ()
 
ParallelOperation< HasHndl > Any ()
 
ParallelOperation< HasHndl > Some (size_t threshold)
 
ParallelOperation< HasHndl > AtLeast (size_t threshold)
 
- Public Member Functions inherited from XrdCl::ConcreteOperation< ParallelOperation, HasHndl, Resp< void > >
 ConcreteOperation (Args &&... args)
 
 ConcreteOperation (ConcreteOperation< ParallelOperation, from, Resp< void >, Args... > &&op)
 
ParallelOperation< true > operator>> (Hdlr &&hdlr)
 
ParallelOperation< true > operator| (Operation< true > &op)
 
ParallelOperation< true > operator| (Operation< true > &&op)
 
ParallelOperation< true > operator| (Operation< false > &op)
 
ParallelOperation< true > operator| (Operation< false > &&op)
 
ParallelOperation< true > operator| (FinalOperation &&fo)
 Adds a final operation to the pipeline.
 
Operation< HasHndl > * Move ()
 
Operation< true > * ToHandled ()
 
ParallelOperation< HasHndl > Timeout (uint16_t timeout)
 Set operation timeout.
 
- Public Member Functions inherited from XrdCl::Operation< HasHndl >
 Operation ()
 Constructor.
 
template<bool from>
 Operation (Operation< from > &&op)
 Move constructor between template instances.
 
virtual ~Operation ()
 Destructor.
 

Private Member Functions

XRootDStatus RunImpl (PipelineHandler *handler, uint16_t pipelineTimeout)
 

Static Private Member Functions

static void Schedule (std::shared_ptr< Ctx > &ctx, const XrdCl::XRootDStatus &st)
 Schedule Ctx::Examine to be executed in the client thread-pool.
 

Private Attributes

std::vector< Pipelinepipelines
 
std::unique_ptr< PolicyExecutorpolicy
 

Friends

template<bool >
class ParallelOperation
 

Additional Inherited Members

- Protected Member Functions inherited from XrdCl::ConcreteOperation< ParallelOperation, HasHndl, Resp< void > >
ParallelOperation< to > Transform ()
 
ParallelOperation< true > StreamImpl (ResponseHandler *handler)
 
- Protected Member Functions inherited from XrdCl::Operation< HasHndl >
void Run (Timeout timeout, std::promise< XRootDStatus > prms, std::function< void(const XRootDStatus &)> final)
 
void AddOperation (Operation< true > *op)
 
- Static Protected Member Functions inherited from XrdCl::ConcreteOperation< ParallelOperation, HasHndl, Resp< void > >
static void AllocHandler (ConcreteOperation< ParallelOperation, true, Resp< void >, Args... > &me)
 
static void AllocHandler (ConcreteOperation< ParallelOperation, false, Resp< void >, Args... > &me)
 
static ParallelOperation< true > PipeImpl (ConcreteOperation< ParallelOperation, HasHndl, Resp< void >, Args... > &me, Operation< true > &op)
 
static ParallelOperation< true > PipeImpl (ConcreteOperation< ParallelOperation, HasHndl, Resp< void >, Args... > &me, Operation< false > &op)
 
- Protected Attributes inherited from XrdCl::ConcreteOperation< ParallelOperation, HasHndl, Resp< void > >
std::tuple< Args... > args
 Operation arguments.
 
uint16_t timeout
 Operation timeout.
 
- Protected Attributes inherited from XrdCl::Operation< HasHndl >
std::unique_ptr< PipelineHandlerhandler
 Operation handler.
 
bool valid
 Flag indicating if it is a valid object.
 

Detailed Description

template<bool HasHndl>
class XrdCl::ParallelOperation< HasHndl >

Parallel operations, allows to execute two or more pipelines in parallel.

Constructor & Destructor Documentation

◆ ParallelOperation() [1/2]

template<bool HasHndl>
template<bool from>
XrdCl::ParallelOperation< HasHndl >::ParallelOperation ( ParallelOperation< from > &&  obj)
inline

Constructor: copy-move a ParallelOperation in different state.

◆ ParallelOperation() [2/2]

template<bool HasHndl>
template<class Container >
XrdCl::ParallelOperation< HasHndl >::ParallelOperation ( Container &&  container)
inline

Constructor

  • Container : iterable container type
Parameters
container: iterable container with pipelines

References XrdCl::ParallelOperation< HasHndl >::pipelines.

◆ ~ParallelOperation()

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

Member Function Documentation

◆ All()

template<bool HasHndl>
ParallelOperation< HasHndl > XrdCl::ParallelOperation< HasHndl >::All ( )
inline

Set policy to All (default)

All operations need to succeed in order for the parallel operation to be successful.

References XrdCl::ParallelOperation< HasHndl >::policy.

◆ Any()

template<bool HasHndl>
ParallelOperation< HasHndl > XrdCl::ParallelOperation< HasHndl >::Any ( )
inline

Set policy to Any

Just one of the operations needs to succeed in order for the parallel operation to be successful.

References XrdCl::ParallelOperation< HasHndl >::pipelines, and XrdCl::ParallelOperation< HasHndl >::policy.

◆ AtLeast()

template<bool HasHndl>
ParallelOperation< HasHndl > XrdCl::ParallelOperation< HasHndl >::AtLeast ( size_t  threshold)
inline

Set policy to At Least.

At least n (user defined) operations need to succeed in order for the parallel operation to be successful (the user handler will be called only when all operations are resolved).

References XrdCl::ParallelOperation< HasHndl >::pipelines, and XrdCl::ParallelOperation< HasHndl >::policy.

◆ RunImpl()

template<bool HasHndl>
XRootDStatus XrdCl::ParallelOperation< HasHndl >::RunImpl ( PipelineHandler handler,
uint16_t  pipelineTimeout 
)
inlineprivatevirtual

◆ Schedule()

template<bool HasHndl>
static void XrdCl::ParallelOperation< HasHndl >::Schedule ( std::shared_ptr< Ctx > &  ctx,
const XrdCl::XRootDStatus st 
)
inlinestaticprivate

◆ Some()

template<bool HasHndl>
ParallelOperation< HasHndl > XrdCl::ParallelOperation< HasHndl >::Some ( size_t  threshold)
inline

n (user defined) operations need to succeed in order for the parallel operation to be successful.

References XrdCl::ParallelOperation< HasHndl >::pipelines, and XrdCl::ParallelOperation< HasHndl >::policy.

◆ ToString()

template<bool HasHndl>
std::string XrdCl::ParallelOperation< HasHndl >::ToString ( )
inlinevirtual
Returns
: operation name

Implements XrdCl::Operation< HasHndl >.

References XrdCl::ParallelOperation< HasHndl >::pipelines.

Friends And Related Symbol Documentation

◆ ParallelOperation

template<bool HasHndl>
template<bool >
friend class ParallelOperation
friend

Member Data Documentation

◆ pipelines

template<bool HasHndl>
std::vector<Pipeline> XrdCl::ParallelOperation< HasHndl >::pipelines
private

◆ policy

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

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