xrootd
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
XrdCl::SIDManager Class Reference

Handle XRootD stream IDs. More...

#include <XrdClSIDManager.hh>

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

Public Member Functions

 ~SIDManager ()
 Destructor.
 
Status AllocateSID (uint8_t sid[2])
 
void ReleaseSID (uint8_t sid[2])
 Release the SID that is no longer needed.
 
void TimeOutSID (uint8_t sid[2])
 Register a SID of a request that timed out.
 
bool IsAnySIDOldAs (const time_t tlim) const
 Check if any SID was allocated at or before a given time.
 
bool IsTimedOut (uint8_t sid[2])
 Check if a SID is timed out.
 
void ReleaseTimedOut (uint8_t sid[2])
 Release a timed out SID.
 
void ReleaseAllTimedOut ()
 Release all timed out SIDs.
 
uint32_t NumberOfTimedOutSIDs () const
 Number of timeout sids.
 
uint16_t GetNumberOfAllocatedSIDs () const
 Number of allocated streams.
 

Private Member Functions

 SIDManager ()
 Constructor.
 

Private Attributes

std::unordered_map< uint16_t, time_t > pAllocTime
 
std::list< uint16_t > pFreeSIDs
 
std::set< uint16_t > pTimeOutSIDs
 
uint16_t pSIDCeiling
 
XrdSysMutex pMutex
 
size_t pRefCount
 

Friends

class SIDMgrPool
 

Detailed Description

Handle XRootD stream IDs.

Constructor & Destructor Documentation

◆ SIDManager()

XrdCl::SIDManager::SIDManager ( )
inlineprivate

Constructor.

◆ ~SIDManager()

XrdCl::SIDManager::~SIDManager ( )
inline

Destructor.

Member Function Documentation

◆ AllocateSID()

Status XrdCl::SIDManager::AllocateSID ( uint8_t  sid[2])

Allocate a SID

Parameters
sida two byte array where the allocated SID should be stored
Returns
stOK on success, stError on error

◆ GetNumberOfAllocatedSIDs()

uint16_t XrdCl::SIDManager::GetNumberOfAllocatedSIDs ( ) const

Number of allocated streams.

◆ IsAnySIDOldAs()

bool XrdCl::SIDManager::IsAnySIDOldAs ( const time_t  tlim) const

Check if any SID was allocated at or before a given time.

◆ IsTimedOut()

bool XrdCl::SIDManager::IsTimedOut ( uint8_t  sid[2])

Check if a SID is timed out.

◆ NumberOfTimedOutSIDs()

uint32_t XrdCl::SIDManager::NumberOfTimedOutSIDs ( ) const
inline

Number of timeout sids.

References pMutex, and pTimeOutSIDs.

◆ ReleaseAllTimedOut()

void XrdCl::SIDManager::ReleaseAllTimedOut ( )

Release all timed out SIDs.

◆ ReleaseSID()

void XrdCl::SIDManager::ReleaseSID ( uint8_t  sid[2])

Release the SID that is no longer needed.

◆ ReleaseTimedOut()

void XrdCl::SIDManager::ReleaseTimedOut ( uint8_t  sid[2])

Release a timed out SID.

◆ TimeOutSID()

void XrdCl::SIDManager::TimeOutSID ( uint8_t  sid[2])

Register a SID of a request that timed out.

Friends And Related Symbol Documentation

◆ SIDMgrPool

friend class SIDMgrPool
friend

Member Data Documentation

◆ pAllocTime

std::unordered_map<uint16_t, time_t> XrdCl::SIDManager::pAllocTime
private

◆ pFreeSIDs

std::list<uint16_t> XrdCl::SIDManager::pFreeSIDs
private

◆ pMutex

XrdSysMutex XrdCl::SIDManager::pMutex
mutableprivate

Referenced by NumberOfTimedOutSIDs().

◆ pRefCount

size_t XrdCl::SIDManager::pRefCount
mutableprivate

◆ pSIDCeiling

uint16_t XrdCl::SIDManager::pSIDCeiling
private

◆ pTimeOutSIDs

std::set<uint16_t> XrdCl::SIDManager::pTimeOutSIDs
private

Referenced by NumberOfTimedOutSIDs().


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