xrootd
|
#include <XrdClParallelOperation.hh>
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< Pipeline > | pipelines |
std::unique_ptr< PolicyExecutor > | policy |
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< PipelineHandler > | handler |
Operation handler. | |
bool | valid |
Flag indicating if it is a valid object. | |
Parallel operations, allows to execute two or more pipelines in parallel.
|
inline |
Constructor: copy-move a ParallelOperation in different state.
|
inline |
Constructor
container | : iterable container with pipelines |
References XrdCl::ParallelOperation< HasHndl >::pipelines.
|
inline |
|
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.
|
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.
|
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.
|
inlineprivatevirtual |
Run operation
params | : container with parameters forwarded from previous operation |
Implements XrdCl::Operation< HasHndl >.
References XrdCl::Operation< HasHndl >::handler, XrdCl::ParallelOperation< HasHndl >::pipelines, XrdCl::ParallelOperation< HasHndl >::policy, XrdCl::ParallelOperation< HasHndl >::Schedule(), and XrdCl::ConcreteOperation< ParallelOperation, HasHndl, Resp< void > >::timeout.
|
inlinestaticprivate |
Schedule Ctx::Examine to be executed in the client thread-pool.
References XrdCl::PostMaster::GetJobManager(), XrdCl::DefaultEnv::GetPostMaster(), and XrdCl::JobManager::QueueJob().
Referenced by XrdCl::ParallelOperation< HasHndl >::RunImpl().
|
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.
|
inlinevirtual |
Implements XrdCl::Operation< HasHndl >.
References XrdCl::ParallelOperation< HasHndl >::pipelines.
|
private |
Referenced by XrdCl::ParallelOperation< HasHndl >::Any(), XrdCl::ParallelOperation< HasHndl >::AtLeast(), XrdCl::ParallelOperation< HasHndl >::ParallelOperation(), XrdCl::ParallelOperation< HasHndl >::RunImpl(), XrdCl::ParallelOperation< HasHndl >::Some(), and XrdCl::ParallelOperation< HasHndl >::ToString().
|
private |