19 #ifndef __XRD_CL_SID_MANAGER_HH__ 20 #define __XRD_CL_SID_MANAGER_HH__ 25 #include <unordered_map> 53 #if __cplusplus < 201103L 152 std::shared_ptr<SIDManager>
GetSIDMgr(
const URL &url );
191 std::unordered_map<std::string, SIDManager*>
pool;
195 #endif // __XRD_CL_SID_MANAGER_HH__ bool IsTimedOut(uint8_t sid[2])
Check if a SID is timed out.
XrdSysMutex pMutex
Definition: XrdClSIDManager.hh:119
void TimeOutSID(uint8_t sid[2])
Register a SID of a request that timed out.
void ReleaseAllTimedOut()
Release all timed out SIDs.
uint32_t NumberOfTimedOutSIDs() const
Number of timeout sids.
Definition: XrdClSIDManager.hh:104
~SIDManager()
Destructor.
Definition: XrdClSIDManager.hh:64
~SIDMgrPool()
Destructor.
Definition: XrdClSIDManager.hh:145
void Recycle(SIDManager *mgr)
Status AllocateSID(uint8_t sid[2])
static SIDMgrPool & Instance()
Definition: XrdClSIDManager.hh:133
A functional object for handling the deletion of SIDManager objects.
Definition: XrdClSIDManager.hh:164
Procedure execution status.
Definition: XrdClStatus.hh:112
XrdSysMutex mtx
Definition: XrdClSIDManager.hh:190
Definition: XrdSysPthread.hh:165
size_t pRefCount
Definition: XrdClSIDManager.hh:120
Pool of SID manager objects.
Definition: XrdClSIDManager.hh:126
Definition: XrdClAnyObject.hh:25
void ReleaseSID(uint8_t sid[2])
Release the SID that is no longer needed.
Handle XRootD stream IDs.
Definition: XrdClSIDManager.hh:42
SIDMgrPool()
Constructor.
Definition: XrdClSIDManager.hh:176
std::shared_ptr< SIDManager > GetSIDMgr(const URL &url)
std::set< uint16_t > pTimeOutSIDs
Definition: XrdClSIDManager.hh:117
URL representation.
Definition: XrdClURL.hh:30
SIDMgrPool & operator=(const SIDMgrPool &)=delete
Deleted assigment operators.
void operator()(SIDManager *mgr)
Definition: XrdClSIDManager.hh:166
std::list< uint16_t > pFreeSIDs
Definition: XrdClSIDManager.hh:116
uint16_t pSIDCeiling
Definition: XrdClSIDManager.hh:118
std::unordered_map< std::string, SIDManager * > pool
Definition: XrdClSIDManager.hh:191
uint16_t GetNumberOfAllocatedSIDs() const
Number of allocated streams.
void ReleaseTimedOut(uint8_t sid[2])
Release a timed out SID.
Definition: XrdSysPthread.hh:262
SIDManager()
Constructor.
Definition: XrdClSIDManager.hh:51