XRootD
Loading...
Searching...
No Matches
XrdCl::Pipeline Class Reference

#include <XrdClOperations.hh>

Collaboration diagram for XrdCl::Pipeline:

Public Member Functions

 Pipeline ()
 Default constructor.
 Pipeline (Operation< false > &&op)
 Constructor.
 Pipeline (Operation< false > &op)
 Constructor.
 Pipeline (Operation< false > *op)
 Pipeline (Operation< true > &&op)
 Constructor.
 Pipeline (Operation< true > &op)
 Constructor.
 Pipeline (Operation< true > *op)
 Constructor.
 Pipeline (Pipeline &&pipe)
 operator bool ()
 operator Operation< true > & ()
Pipelineoperator= (Pipeline &&pipe)
 Constructor.
Pipelineoperator|= (Operation< false > &&op)
 Extend pipeline.
Pipelineoperator|= (Operation< true > &&op)
 Extend pipeline.

Static Public Member Functions

static void Ignore ()
 Ignore error and proceed with the pipeline.
static void Repeat ()
 Repeat current operation.
static void Replace (Operation< false > &&opr)
 Replace current operation.
static void Replace (Pipeline p)
 Replace with pipeline.
static void Stop (const XRootDStatus &status=XrdCl::XRootDStatus())

Friends

std::future< XRootDStatusAsync (Pipeline pipeline, uint16_t timeout=0)
template<bool>
class ParallelOperation
class PipelineHandler

Detailed Description

A wrapper around operation pipeline. A Pipeline is a once-use-only object - once executed by a Workflow engine it is invalidated.

Takes ownership of given operation pipeline (which is in most would be a temporary object)

Definition at line 290 of file XrdClOperations.hh.

Constructor & Destructor Documentation

◆ Pipeline() [1/8]

XrdCl::Pipeline::Pipeline ( )
inline

Default constructor.

Definition at line 301 of file XrdClOperations.hh.

302 {
303 }

Referenced by Pipeline(), operator=(), operator|=(), operator|=(), ParallelOperation, and Replace().

Here is the caller graph for this function:

◆ Pipeline() [2/8]

XrdCl::Pipeline::Pipeline ( Operation< true > * op)
inline

Constructor.

Definition at line 308 of file XrdClOperations.hh.

308 :
309 operation( op->Move() )
310 {
311 }

◆ Pipeline() [3/8]

XrdCl::Pipeline::Pipeline ( Operation< true > & op)
inline

Constructor.

Definition at line 316 of file XrdClOperations.hh.

316 :
317 operation( op.Move() )
318 {
319 }

◆ Pipeline() [4/8]

XrdCl::Pipeline::Pipeline ( Operation< true > && op)
inline

Constructor.

Definition at line 324 of file XrdClOperations.hh.

324 :
325 operation( op.Move() )
326 {
327 }

◆ Pipeline() [5/8]

XrdCl::Pipeline::Pipeline ( Operation< false > * op)
inline

Definition at line 329 of file XrdClOperations.hh.

329 :
330 operation( op->ToHandled() )
331 {
332 }

◆ Pipeline() [6/8]

XrdCl::Pipeline::Pipeline ( Operation< false > & op)
inline

Constructor.

Definition at line 337 of file XrdClOperations.hh.

337 :
338 operation( op.ToHandled() )
339 {
340 }

◆ Pipeline() [7/8]

XrdCl::Pipeline::Pipeline ( Operation< false > && op)
inline

Constructor.

Definition at line 345 of file XrdClOperations.hh.

345 :
346 operation( op.ToHandled() )
347 {
348 }

◆ Pipeline() [8/8]

XrdCl::Pipeline::Pipeline ( Pipeline && pipe)
inline

Definition at line 350 of file XrdClOperations.hh.

350 :
351 operation( std::move( pipe.operation ) )
352 {
353 }

References Pipeline().

Here is the call graph for this function:

Member Function Documentation

◆ Ignore()

void XrdCl::Pipeline::Ignore ( )
static

Ignore error and proceed with the pipeline.

Definition at line 275 of file XrdClOperations.cc.

276 {
277 throw IgnoreError();
278 }

◆ operator bool()

XrdCl::Pipeline::operator bool ( )
inline

Conversion to boolean

Returns
: true if it's a valid pipeline, false otherwise

Definition at line 398 of file XrdClOperations.hh.

399 {
400 return bool( operation );
401 }

◆ operator Operation< true > &()

XrdCl::Pipeline::operator Operation< true > & ( )
inline

Conversion to Operation<true>

Exceptions
std::logic_error if pipeline is invalid

Definition at line 387 of file XrdClOperations.hh.

388 {
389 if( !bool( operation ) ) throw std::logic_error( "Invalid pipeline." );
390 return *operation.get();
391 }

◆ operator=()

Pipeline & XrdCl::Pipeline::operator= ( Pipeline && pipe)
inline

Constructor.

Definition at line 358 of file XrdClOperations.hh.

359 {
360 operation = std::move( pipe.operation );
361 return *this;
362 }

References Pipeline().

Here is the call graph for this function:

◆ operator|=() [1/2]

Pipeline & XrdCl::Pipeline::operator|= ( Operation< false > && op)
inline

Extend pipeline.

Definition at line 376 of file XrdClOperations.hh.

377 {
378 operation->AddOperation( op.ToHandled() );
379 return *this;
380 }

References Pipeline(), and XrdCl::Operation< HasHndl >::AddOperation().

Here is the call graph for this function:

◆ operator|=() [2/2]

Pipeline & XrdCl::Pipeline::operator|= ( Operation< true > && op)
inline

Extend pipeline.

Definition at line 367 of file XrdClOperations.hh.

368 {
369 operation->AddOperation( op.Move() );
370 return *this;
371 }

References Pipeline(), and XrdCl::Operation< HasHndl >::AddOperation().

Here is the call graph for this function:

◆ Repeat()

void XrdCl::Pipeline::Repeat ( )
static

Repeat current operation.

Definition at line 251 of file XrdClOperations.cc.

252 {
253 throw RepeatOpeation();
254 }

Referenced by XrdCl::ZipArchive::OpenArchive().

Here is the caller graph for this function:

◆ Replace() [1/2]

void XrdCl::Pipeline::Replace ( Operation< false > && opr)
static

Replace current operation.

Definition at line 259 of file XrdClOperations.cc.

260 {
261 throw ReplaceOperation( std::move( opr ) );
262 }

◆ Replace() [2/2]

void XrdCl::Pipeline::Replace ( Pipeline p)
static

Replace with pipeline.

Definition at line 267 of file XrdClOperations.cc.

268 {
269 throw ReplacePipeline( std::move( p ) );
270 }

References Pipeline().

Here is the call graph for this function:

◆ Stop()

void XrdCl::Pipeline::Stop ( const XRootDStatus & status = XrdCl::XRootDStatus())
static

Stop the current pipeline

Parameters
status: the final status for the pipeline

Definition at line 243 of file XrdClOperations.cc.

244 {
245 throw StopPipeline( status );
246 }

Referenced by XrdCl::ZipArchive::OpenArchive().

Here is the caller graph for this function:

◆ Async

std::future< XRootDStatus > Async ( Pipeline pipeline,
uint16_t timeout = 0 )
friend

Helper function, schedules execution of given pipeline

Parameters
pipeline: the pipeline to be executed
timeout: the pipeline timeout
Returns
: future status of the operation

Definition at line 488 of file XrdClOperations.hh.

489 {
490 pipeline.Run( timeout );
491 return std::move( pipeline.ftr );
492 }

◆ ParallelOperation

template<bool>
friend class ParallelOperation
friend

Definition at line 292 of file XrdClOperations.hh.

References Pipeline(), and ParallelOperation.

Referenced by ParallelOperation.

◆ PipelineHandler

friend class PipelineHandler
friend

Definition at line 294 of file XrdClOperations.hh.

References PipelineHandler.

Referenced by PipelineHandler.


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