XrdCl::RequestSync Class Reference

A helper running a fixed number of requests at a given time. More...

#include <XrdClRequestSync.hh>

Collaboration diagram for XrdCl::RequestSync:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RequestSync (uint32_t reqTotal, uint32_t reqQuota)
 ~RequestSync ()
 Destructor.
void WaitForQuota ()
 Wait for the request quota.
void WaitForAll ()
 Wait for all the requests to be finished.
void TaskDone (bool success=true)
 Report the request finish.
uint32_t FailureCount () const
 Number of tasks finishing with an error.

Private Member Functions

 RequestSync (const RequestSync &other)
RequestSyncoperator= (const RequestSync &other)

Private Attributes

XrdSysMutex pMutex
SemaphorepQuotaSem
SemaphorepTotalSem
uint32_t pRequestsLeft
uint32_t pFailureCounter

Detailed Description

A helper running a fixed number of requests at a given time.


Constructor & Destructor Documentation

XrdCl::RequestSync::RequestSync ( uint32_t  reqTotal,
uint32_t  reqQuota 
) [inline]

Constructor

Parameters:
reqTotal total number of requests
reqQuota number of requests to be run in parallel

References XrdSysSemaphore::Post(), and pTotalSem.

XrdCl::RequestSync::~RequestSync (  )  [inline]

Destructor.

References pQuotaSem, and pTotalSem.

XrdCl::RequestSync::RequestSync ( const RequestSync other  )  [private]

Member Function Documentation

uint32_t XrdCl::RequestSync::FailureCount (  )  const [inline]

Number of tasks finishing with an error.

References pFailureCounter.

RequestSync& XrdCl::RequestSync::operator= ( const RequestSync other  )  [private]
void XrdCl::RequestSync::TaskDone ( bool  success = true  )  [inline]

Report the request finish.

References pFailureCounter, pMutex, XrdSysSemaphore::Post(), pQuotaSem, pRequestsLeft, and pTotalSem.

void XrdCl::RequestSync::WaitForAll (  )  [inline]

Wait for all the requests to be finished.

References pTotalSem, and XrdSysSemaphore::Wait().

void XrdCl::RequestSync::WaitForQuota (  )  [inline]

Wait for the request quota.

References pQuotaSem, and XrdSysSemaphore::Wait().


Member Data Documentation

Referenced by FailureCount(), and TaskDone().

Referenced by TaskDone().

Referenced by TaskDone().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 8 May 2020 for xrootd by  doxygen 1.6.1