19#ifndef __XRD_CL_SID_MANAGER_HH__
20#define __XRD_CL_SID_MANAGER_HH__
25#include <unordered_map>
53#if __cplusplus < 201103L
197 std::unordered_map<std::string, SIDManager*>
pool;
Handle XRootD stream IDs.
Definition XrdClSIDManager.hh:43
void ReleaseTimedOut(uint8_t sid[2])
Release a timed out SID.
uint16_t GetNumberOfAllocatedSIDs() const
Number of allocated streams.
SIDManager()
Constructor.
Definition XrdClSIDManager.hh:51
std::list< uint16_t > pFreeSIDs
Definition XrdClSIDManager.hh:122
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.
std::set< uint16_t > pTimeOutSIDs
Definition XrdClSIDManager.hh:123
std::unordered_map< uint16_t, time_t > pAllocTime
Definition XrdClSIDManager.hh:121
XrdSysMutex pMutex
Definition XrdClSIDManager.hh:125
size_t pRefCount
Definition XrdClSIDManager.hh:126
uint16_t pSIDCeiling
Definition XrdClSIDManager.hh:124
bool IsTimedOut(uint8_t sid[2])
Check if a SID is timed out.
~SIDManager()
Destructor.
Definition XrdClSIDManager.hh:64
Status AllocateSID(uint8_t sid[2])
uint32_t NumberOfTimedOutSIDs() const
Number of timeout sids.
Definition XrdClSIDManager.hh:109
void ReleaseAllTimedOut()
Release all timed out SIDs.
void ReleaseSID(uint8_t sid[2])
Release the SID that is no longer needed.
Pool of SID manager objects.
Definition XrdClSIDManager.hh:133
SIDMgrPool(SIDMgrPool &&)=delete
static SIDMgrPool & Instance()
Definition XrdClSIDManager.hh:139
XrdSysMutex mtx
Definition XrdClSIDManager.hh:196
std::unordered_map< std::string, SIDManager * > pool
Definition XrdClSIDManager.hh:197
~SIDMgrPool()
Destructor.
Definition XrdClSIDManager.hh:151
SIDMgrPool(const SIDMgrPool &)=delete
Deleted constructors.
SIDMgrPool & operator=(SIDMgrPool &&)=delete
SIDMgrPool & operator=(const SIDMgrPool &)=delete
Deleted assigment operators.
void Recycle(SIDManager *mgr)
std::shared_ptr< SIDManager > GetSIDMgr(const URL &url)
SIDMgrPool()
Constructor.
Definition XrdClSIDManager.hh:182
URL representation.
Definition XrdClURL.hh:31
Definition XrdSysPthread.hh:263
Definition XrdSysPthread.hh:165
Definition XrdClAction.hh:34
A functional object for handling the deletion of SIDManager objects.
Definition XrdClSIDManager.hh:171
void operator()(SIDManager *mgr)
Definition XrdClSIDManager.hh:172
Procedure execution status.
Definition XrdClStatus.hh:115