Loading...
Searching...
No Matches
XrdClOperations.hh
Go to the documentation of this file.
//------------------------------------------------------------------------------
// Copyright (c) 2011-2017 by European Organization for Nuclear Research (CERN)
// Author: Krzysztof Jamrog <krzysztof.piotr.jamrog@cern.ch>,
// Michal Simon <michal.simon@cern.ch>
//------------------------------------------------------------------------------
// This file is part of the XRootD software suite.
//
// XRootD is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// XRootD is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
//
// In applying this licence, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//------------------------------------------------------------------------------
#ifndef __XRD_CL_OPERATIONS_HH__
#define __XRD_CL_OPERATIONS_HH__
#include <memory>
#include <stdexcept>
#include <sstream>
#include <tuple>
#include <future>
#include "XrdCl/XrdClXRootDResponses.hh"
#include "XrdCl/XrdClOperationHandlers.hh"
#include "XrdCl/XrdClArg.hh"
#include "XrdCl/XrdClOperationTimeout.hh"
#include "XrdCl/XrdClFinalOperation.hh"
#include "XrdSys/XrdSysPthread.hh"
#include "XrdCl/XrdClResponseJob.hh"
#include "XrdCl/XrdClJobManager.hh"
#include "XrdCl/XrdClPostMaster.hh"
#include "XrdCl/XrdClDefaultEnv.hh"
namespace XrdCl
{
class Pipeline;
class PipelineHandler;
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class Operation
{
// Declare friendship between templates
template<bool>
friend class Operation;
friend std::future<XRootDStatus> Async( Pipeline, uint16_t );
friend class Pipeline;
friend class PipelineHandler;
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Operation() : valid( true )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<bool from>
Operation( Operation<from> && op ) :
handler( std::move( op.handler ) ), valid( true )
{
if( !op.valid ) throw std::invalid_argument( "Cannot construct "
"Operation from an invalid Operation!" );
op.valid = false;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual ~Operation()
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual std::string ToString() = 0;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual Operation<HasHndl>* Move() = 0;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual Operation<true>* ToHandled() = 0;
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void Run( Timeout timeout,
std::promise<XRootDStatus> prms,
std::function<void(const XRootDStatus&)> final );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual XRootDStatus RunImpl( PipelineHandler *handler, uint16_t timeout ) = 0;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void AddOperation( Operation<true> *op );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::unique_ptr<PipelineHandler> handler;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
bool valid;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
typedef std::function<Operation<true>*(const XRootDStatus&)> rcvry_func;
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class PipelineHandler: public ResponseHandler
{
template<bool> friend class Operation;
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
PipelineHandler( ResponseHandler *handler );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
PipelineHandler()
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponseWithHosts( XRootDStatus *status, AnyObject *response,
HostList *hostList );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponse( XRootDStatus *status, AnyObject *response );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
~PipelineHandler()
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
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 );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void PreparePipelineStart();
private:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponseImpl( XRootDStatus *status, AnyObject *response,
HostList *hostList = nullptr );
inline void dealloc( XRootDStatus *status, AnyObject *response,
HostList *hostList )
{
delete status;
delete response;
delete hostList;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::unique_ptr<ResponseHandler> responseHandler;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::unique_ptr<Operation<true>> currentOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::unique_ptr<Operation<true>> nextOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Timeout timeout;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::promise<XRootDStatus> prms;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::function<void(const XRootDStatus&)> final;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class Pipeline
{
template<bool> friend class ParallelOperation;
friend std::future<XRootDStatus> Async( Pipeline, uint16_t );
friend class PipelineHandler;
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline()
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline( Operation<true> *op ) :
operation( op->Move() )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline( Operation<true> &op ) :
operation( op.Move() )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline( Operation<true> &&op ) :
operation( op.Move() )
{
}
Pipeline( Operation<false> *op ) :
operation( op->ToHandled() )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline( Operation<false> &op ) :
operation( op.ToHandled() )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline( Operation<false> &&op ) :
operation( op.ToHandled() )
{
}
Pipeline( Pipeline &&pipe ) :
operation( std::move( pipe.operation ) )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline& operator=( Pipeline &&pipe )
{
operation = std::move( pipe.operation );
return *this;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline& operator|=( Operation<true>&& op )
{
operation->AddOperation( op.Move() );
return *this;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Pipeline& operator|=( Operation<false>&& op )
{
operation->AddOperation( op.ToHandled() );
return *this;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
operator Operation<true>&()
{
if( !bool( operation ) ) throw std::logic_error( "Invalid pipeline." );
return *operation.get();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
operator bool()
{
return bool( operation );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
static void Stop( const XRootDStatus &status = XrdCl::XRootDStatus() );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
static void Repeat();
//------------------------------------------------------------------------
//------------------------------------------------------------------------
static void Replace( Operation<false> &&opr );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
static void Replace( Pipeline p );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
static void Ignore();
private:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Operation<true>* operator->()
{
return operation.get();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void Run( Timeout timeout, std::function<void(const XRootDStatus&)> final = nullptr )
{
if( ftr.valid() )
throw std::logic_error( "Pipeline is already running!" );
// a promise that the pipe will have a result
std::promise<XRootDStatus> prms;
ftr = prms.get_future();
if( !operation ) std::logic_error( "Empty pipeline!" );
Operation<true> *opr = operation.release();
PipelineHandler *h = opr->handler.get();
if( h )
h->PreparePipelineStart();
opr->Run( timeout, std::move( prms ), std::move( final ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::unique_ptr<Operation<true>> operation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::future<XRootDStatus> ftr;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline std::future<XRootDStatus> Async( Pipeline pipeline, uint16_t timeout = 0 )
{
pipeline.Run( timeout );
return std::move( pipeline.ftr );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline XRootDStatus WaitFor( Pipeline pipeline, uint16_t timeout = 0 )
{
return Async( std::move( pipeline ), timeout ).get();
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<template<bool> class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
class ConcreteOperation: public Operation<HasHndl>
{
template<template<bool> class, bool, typename, typename ...>
friend class ConcreteOperation;
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
ConcreteOperation( Args&&... args ) : args( std::tuple<Args...>( std::move( args )... ) ),
timeout( 0 )
{
static_assert( !HasHndl, "It is only possible to construct operation without handler" );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<bool from>
ConcreteOperation( ConcreteOperation<Derived, from, HdlrFactory, Args...> && op ) :
Operation<HasHndl>( std::move( op ) ), args( std::move( op.args ) ), timeout( 0 )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<typename Hdlr>
Derived<true> operator>>( Hdlr &&hdlr )
{
return this->StreamImpl( HdlrFactory::Create( hdlr ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Derived<true> operator|( Operation<true> &op )
{
return PipeImpl( *this, op );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Derived<true> operator|( Operation<true> &&op )
{
return PipeImpl( *this, op );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Derived<true> operator|( Operation<false> &op )
{
return PipeImpl( *this, op );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Derived<true> operator|( Operation<false> &&op )
{
return PipeImpl( *this, op );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Derived<true> operator|( FinalOperation &&fo )
{
AllocHandler( *this );
this->handler->Assign( fo.final );
return this->template Transform<true>();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline Operation<HasHndl>* Move()
{
Derived<HasHndl> *me = static_cast<Derived<HasHndl>*>( this );
return new Derived<HasHndl>( std::move( *me ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline Operation<true>* ToHandled()
{
this->handler.reset( new PipelineHandler() );
Derived<HasHndl> *me = static_cast<Derived<HasHndl>*>( this );
return new Derived<true>( std::move( *me ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Derived<HasHndl> Timeout( uint16_t timeout )
{
this->timeout = timeout;
Derived<HasHndl> *me = static_cast<Derived<HasHndl>*>( this );
return std::move( *me );
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<bool to>
inline Derived<to> Transform()
{
Derived<HasHndl> *me = static_cast<Derived<HasHndl>*>( this );
return Derived<to>( std::move( *me ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline Derived<true> StreamImpl( ResponseHandler *handler )
{
static_assert( !HasHndl, "Operator >> is available only for operation without handler" );
this->handler.reset( new PipelineHandler( handler ) );
return Transform<true>();
}
//------------------------------------------------------------------------
// Allocate handler if necessary
//------------------------------------------------------------------------
inline static
void AllocHandler( ConcreteOperation<Derived, true, HdlrFactory, Args...> &me )
{
// nothing to do
}
//------------------------------------------------------------------------
// Allocate handler if necessary
//------------------------------------------------------------------------
inline static
void AllocHandler( ConcreteOperation<Derived, false, HdlrFactory, Args...> &me )
{
me.handler.reset( new PipelineHandler() );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static
Derived<true> PipeImpl( ConcreteOperation<Derived, HasHndl, HdlrFactory,
Args...> &me, Operation<true> &op )
{
AllocHandler( me ); // if HasHndl is false allocate handler
me.AddOperation( op.Move() );
return me.template Transform<true>();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static
Derived<true> PipeImpl( ConcreteOperation<Derived, HasHndl, HdlrFactory,
Args...> &me, Operation<false> &op )
{
AllocHandler( me ); // if HasHndl is false allocate handler
me.AddOperation( op.ToHandled() );
return me.template Transform<true>();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::tuple<Args...> args;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
uint16_t timeout;
};
// Out-of-line methods for class Operation
template <bool HasHndl>
void Operation<HasHndl>::Run(Timeout timeout, std::promise<XRootDStatus> prms,
std::function<void(const XRootDStatus &)> f)
{
static_assert(HasHndl, "Only an operation that has a handler can be assigned to workflow");
XRootDStatus st;
handler->Assign(timeout, std::move(prms), std::move(f), this);
PipelineHandler *h = handler.release();
try {
st = RunImpl(h, timeout);
} catch (const operation_expired &ex) {
st = XRootDStatus(stError, errOperationExpired);
} catch (const PipelineException &ex) { // probably not needed
st = ex.GetError();
} catch (const std::exception &ex) {
st = XRootDStatus(stError, errInternal, 0, ex.what());
}
if (!st.IsOK()) {
ResponseJob *job = new ResponseJob(h, new XRootDStatus(st), 0, nullptr);
DefaultEnv::GetPostMaster()->GetJobManager()->QueueJob(job);
}
}
template <bool HasHndl>
void Operation<HasHndl>::AddOperation(Operation<true> *op)
{
if (handler)
handler->AddOperation(op);
}
}
#endif // __XRD_CL_OPERATIONS_HH__
XrdClArg.hh
XrdClDefaultEnv.hh
XrdClFinalOperation.hh
XrdClJobManager.hh
XrdClOperationHandlers.hh
XrdClOperationTimeout.hh
XrdClPostMaster.hh
XrdClResponseJob.hh
XrdClXRootDResponses.hh
XrdSysPthread.hh
XrdCl::AnyObject
Definition XrdClAnyObject.hh:33
XrdCl::ConcreteOperation::Transform
Derived< to > Transform()
Definition XrdClOperations.hh:662
XrdCl::ConcreteOperation::operator|
Derived< true > operator|(Operation< true > &&op)
Definition XrdClOperations.hh:582
XrdCl::ConcreteOperation::AllocHandler
static void AllocHandler(ConcreteOperation< Derived, true, HdlrFactory, Args... > &me)
Definition XrdClOperations.hh:686
XrdCl::ConcreteOperation::AllocHandler
static void AllocHandler(ConcreteOperation< Derived, false, HdlrFactory, Args... > &me)
Definition XrdClOperations.hh:695
XrdCl::ConcreteOperation::args
std::tuple< Args... > args
Operation arguments.
Definition XrdClOperations.hh:737
XrdCl::ConcreteOperation::StreamImpl
Derived< true > StreamImpl(ResponseHandler *handler)
Definition XrdClOperations.hh:675
XrdCl::ConcreteOperation::ConcreteOperation
ConcreteOperation(ConcreteOperation< Derived, from, HdlrFactory, Args... > &&op)
Definition XrdClOperations.hh:543
XrdCl::ConcreteOperation::Timeout
Derived< HasHndl > Timeout(uint16_t timeout)
Set operation timeout.
Definition XrdClOperations.hh:647
XrdCl::ConcreteOperation::operator>>
Derived< true > operator>>(Hdlr &&hdlr)
Definition XrdClOperations.hh:558
XrdCl::ConcreteOperation::timeout
uint16_t timeout
Operation timeout.
Definition XrdClOperations.hh:742
XrdCl::ConcreteOperation::ConcreteOperation
ConcreteOperation(Args &&... args)
Definition XrdClOperations.hh:529
XrdCl::ConcreteOperation::operator|
Derived< true > operator|(Operation< false > &op)
Definition XrdClOperations.hh:594
XrdCl::ConcreteOperation::Move
Operation< HasHndl > * Move()
Definition XrdClOperations.hh:626
XrdCl::ConcreteOperation::PipeImpl
static Derived< true > PipeImpl(ConcreteOperation< Derived, HasHndl, HdlrFactory, Args... > &me, Operation< false > &op)
Definition XrdClOperations.hh:726
XrdCl::ConcreteOperation::operator|
Derived< true > operator|(Operation< false > &&op)
Definition XrdClOperations.hh:606
XrdCl::ConcreteOperation::operator|
Derived< true > operator|(FinalOperation &&fo)
Adds a final operation to the pipeline.
Definition XrdClOperations.hh:614
XrdCl::ConcreteOperation::ToHandled
Operation< true > * ToHandled()
Definition XrdClOperations.hh:637
XrdCl::ConcreteOperation::PipeImpl
static Derived< true > PipeImpl(ConcreteOperation< Derived, HasHndl, HdlrFactory, Args... > &me, Operation< true > &op)
Definition XrdClOperations.hh:709
XrdCl::ConcreteOperation::ConcreteOperation
friend class ConcreteOperation
Definition XrdClOperations.hh:520
XrdCl::ConcreteOperation::operator|
Derived< true > operator|(Operation< true > &op)
Definition XrdClOperations.hh:570
XrdCl::DefaultEnv::GetPostMaster
static PostMaster * GetPostMaster()
Get default post master.
Definition XrdClDefaultEnv.cc:453
XrdCl::FinalOperation
Definition XrdClFinalOperation.hh:42
XrdCl::JobManager::QueueJob
void QueueJob(Job *job, void *arg=0)
Add a job to be run.
Definition XrdClJobManager.hh:92
XrdCl::Operation
Definition XrdClOperations.hh:61
XrdCl::Operation::~Operation
virtual ~Operation()
Destructor.
Definition XrdClOperations.hh:95
XrdCl::Operation::Move
virtual Operation< HasHndl > * Move()=0
XrdCl::Operation::Async
friend std::future< XRootDStatus > Async(Pipeline, uint16_t)
Definition XrdClOperations.hh:488
XrdCl::Operation::PipelineHandler
friend class PipelineHandler
Definition XrdClOperations.hh:69
XrdCl::Operation::Operation
Operation()
Constructor.
Definition XrdClOperations.hh:76
XrdCl::Operation::AddOperation
void AddOperation(Operation< true > *op)
Definition XrdClOperations.hh:774
XrdCl::Operation::Run
void Run(Timeout timeout, std::promise< XRootDStatus > prms, std::function< void(const XRootDStatus &)> final)
Definition XrdClOperations.hh:748
XrdCl::Operation::valid
bool valid
Flag indicating if it is a valid object.
Definition XrdClOperations.hh:155
XrdCl::Operation::ToString
virtual std::string ToString()=0
Name of the operation.
XrdCl::Operation::RunImpl
virtual XRootDStatus RunImpl(PipelineHandler *handler, uint16_t timeout)=0
XrdCl::Operation::ToHandled
virtual Operation< true > * ToHandled()=0
XrdCl::Operation::handler
std::unique_ptr< PipelineHandler > handler
Operation handler.
Definition XrdClOperations.hh:150
XrdCl::Operation::Operation
friend class Operation
Definition XrdClOperations.hh:64
XrdCl::Operation::Operation
Operation(Operation< from > &&op)
Move constructor between template instances.
Definition XrdClOperations.hh:84
XrdCl::Operation< true >::Pipeline
friend class Pipeline
Definition XrdClOperations.hh:68
XrdCl::PipelineException
Pipeline exception, wrapps an XRootDStatus.
Definition XrdClOperationHandlers.hh:401
XrdCl::PipelineHandler
Definition XrdClOperations.hh:168
XrdCl::PipelineHandler::HandleResponseWithHosts
void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
Callback function.
Definition XrdClOperations.cc:171
XrdCl::PipelineHandler::PipelineHandler
PipelineHandler()
Default Constructor.
Definition XrdClOperations.hh:183
XrdCl::PipelineHandler::PreparePipelineStart
void PreparePipelineStart()
Called by a pipeline on the handler of its first operation before Run.
Definition XrdClOperations.cc:216
XrdCl::PipelineHandler::Assign
void Assign(const Timeout &timeout, std::promise< XRootDStatus > prms, std::function< void(const XRootDStatus &)> final, Operation< true > *opr)
Definition XrdClOperations.cc:189
XrdCl::PipelineHandler::~PipelineHandler
~PipelineHandler()
Destructor.
Definition XrdClOperations.hh:201
XrdCl::PipelineHandler::PipelineHandler
PipelineHandler(ResponseHandler *handler)
Definition XrdClOperations.cc:85
XrdCl::PipelineHandler::HandleResponse
void HandleResponse(XRootDStatus *status, AnyObject *response)
Callback function.
Definition XrdClOperations.cc:180
XrdCl::PipelineHandler::AddOperation
void AddOperation(Operation< true > *operation)
Definition XrdClOperations.cc:93
XrdCl::PipelineHandler::Operation
friend class Operation
Definition XrdClOperations.hh:169
XrdCl::Pipeline
Definition XrdClOperations.hh:291
XrdCl::Pipeline::Pipeline
Pipeline(Operation< true > *op)
Constructor.
Definition XrdClOperations.hh:308
XrdCl::Pipeline::Pipeline
Pipeline(Operation< true > &&op)
Constructor.
Definition XrdClOperations.hh:324
XrdCl::Pipeline::operator|=
Pipeline & operator|=(Operation< true > &&op)
Extend pipeline.
Definition XrdClOperations.hh:367
XrdCl::Pipeline::Repeat
static void Repeat()
Repeat current operation.
Definition XrdClOperations.cc:251
XrdCl::Pipeline::Pipeline
Pipeline(Operation< true > &op)
Constructor.
Definition XrdClOperations.hh:316
XrdCl::Pipeline::Async
friend std::future< XRootDStatus > Async(Pipeline, uint16_t)
Definition XrdClOperations.hh:488
XrdCl::Pipeline::PipelineHandler
friend class PipelineHandler
Definition XrdClOperations.hh:294
XrdCl::Pipeline::Pipeline
Pipeline(Pipeline &&pipe)
Definition XrdClOperations.hh:350
XrdCl::Pipeline::operator=
Pipeline & operator=(Pipeline &&pipe)
Constructor.
Definition XrdClOperations.hh:358
XrdCl::Pipeline::Pipeline
Pipeline(Operation< false > *op)
Definition XrdClOperations.hh:329
XrdCl::Pipeline::Stop
static void Stop(const XRootDStatus &status=XrdCl::XRootDStatus())
Definition XrdClOperations.cc:243
XrdCl::Pipeline::Pipeline
Pipeline(Operation< false > &&op)
Constructor.
Definition XrdClOperations.hh:345
XrdCl::Pipeline::Replace
static void Replace(Operation< false > &&opr)
Replace current operation.
Definition XrdClOperations.cc:259
XrdCl::Pipeline::ParallelOperation
friend class ParallelOperation
Definition XrdClOperations.hh:292
XrdCl::Pipeline::Ignore
static void Ignore()
Ignore error and proceed with the pipeline.
Definition XrdClOperations.cc:275
XrdCl::Pipeline::Pipeline
Pipeline(Operation< false > &op)
Constructor.
Definition XrdClOperations.hh:337
XrdCl::Pipeline::Pipeline
Pipeline()
Default constructor.
Definition XrdClOperations.hh:301
XrdCl::Pipeline::operator|=
Pipeline & operator|=(Operation< false > &&op)
Extend pipeline.
Definition XrdClOperations.hh:376
XrdCl::PostMaster::GetJobManager
JobManager * GetJobManager()
Get the job manager object user by the post master.
Definition XrdClPostMaster.cc:316
XrdCl::ResponseHandler
Handle an async response.
Definition XrdClXRootDResponses.hh:1127
XrdCl::ResponseJob
Call the user callback.
Definition XrdClResponseJob.hh:31
XrdCl::Timeout
Definition XrdClOperationTimeout.hh:20
XrdCl::XRootDStatus
Request status.
Definition XrdClXRootDResponses.hh:219
XrdCl::operation_expired
Definition XrdClOperationTimeout.hh:17
XrdCl
Definition XrdClAction.hh:34
XrdCl::errOperationExpired
const uint16_t errOperationExpired
Definition XrdClStatus.hh:90
XrdCl::stError
const uint16_t stError
An error occurred that could potentially be retried.
Definition XrdClStatus.hh:32
XrdCl::rcvry_func
std::function< Operation< true > *(const XRootDStatus &)> rcvry_func
Type of the recovery function to be provided by the user.
Definition XrdClOperations.hh:161
XrdCl::WaitFor
XRootDStatus WaitFor(Pipeline pipeline, uint16_t timeout=0)
Definition XrdClOperations.hh:503
XrdCl::HostList
std::vector< HostInfo > HostList
Definition XrdClXRootDResponses.hh:1121
XrdCl::errInternal
const uint16_t errInternal
Internal error.
Definition XrdClStatus.hh:56
XrdCl::Async
std::future< XRootDStatus > Async(Pipeline pipeline, uint16_t timeout=0)
Definition XrdClOperations.hh:488
XrdCl::Status::IsOK
bool IsOK() const
We're fine.
Definition XrdClStatus.hh:124