Handle XRootD stream IDs. More...
#include <XrdClSIDManager.hh>
Public Member Functions | |
SIDManager () | |
Constructor. | |
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 | 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 Attributes | |
std::list< uint16_t > | pFreeSIDs |
std::set< uint16_t > | pTimeOutSIDs |
uint16_t | pSIDCeiling |
XrdSysMutex | pMutex |
Handle XRootD stream IDs.
XrdCl::SIDManager::SIDManager | ( | ) | [inline] |
Constructor.
Status XrdCl::SIDManager::AllocateSID | ( | uint8_t | sid[2] | ) |
Allocate a SID
sid | a two byte array where the allocated SID should be stored |
uint16_t XrdCl::SIDManager::GetNumberOfAllocatedSIDs | ( | ) | const |
Number of allocated streams.
bool XrdCl::SIDManager::IsTimedOut | ( | uint8_t | sid[2] | ) |
Check if a SID is timed out.
uint32_t XrdCl::SIDManager::NumberOfTimedOutSIDs | ( | ) | const [inline] |
Number of timeout sids.
References pMutex, and pTimeOutSIDs.
void XrdCl::SIDManager::ReleaseAllTimedOut | ( | ) |
Release all timed out SIDs.
void XrdCl::SIDManager::ReleaseSID | ( | uint8_t | sid[2] | ) |
Release the SID that is no longer needed.
void XrdCl::SIDManager::ReleaseTimedOut | ( | uint8_t | sid[2] | ) |
Release a timed out SID.
void XrdCl::SIDManager::TimeOutSID | ( | uint8_t | sid[2] | ) |
Register a SID of a request that timed out.
std::list<uint16_t> XrdCl::SIDManager::pFreeSIDs [private] |
XrdSysMutex XrdCl::SIDManager::pMutex [mutable, private] |
Referenced by NumberOfTimedOutSIDs().
uint16_t XrdCl::SIDManager::pSIDCeiling [private] |
std::set<uint16_t> XrdCl::SIDManager::pTimeOutSIDs [private] |
Referenced by NumberOfTimedOutSIDs().