xrootd
|
#include <XrdClientUrlSet.hh>
Public Member Functions | |
XrdClientUrlSet (XrdOucString urls) | |
~XrdClientUrlSet () | |
XrdOucString | GetServers () |
XrdClientUrlInfo * | GetNextUrl () |
XrdClientUrlInfo * | GetARandomUrl () |
XrdClientUrlInfo * | GetARandomUrl (unsigned int seed) |
void | Rewind () |
void | ShowUrls () |
void | EraseUrl (XrdClientUrlInfo *url) |
int | Size () |
XrdOucString | GetFile () |
bool | IsValid () |
Private Member Functions | |
void | CheckPort (int &port) |
void | ConvertDNSAlias (UrlArray &urls, XrdOucString proto, XrdOucString host, XrdOucString file) |
double | GetRandom (int seed=0) |
Private Attributes | |
UrlArray | fUrlArray |
UrlArray | fTmpUrlArray |
XrdOucString | fPathName |
bool | fIsValid |
unsigned int | fSeed |
XrdClientUrlSet::XrdClientUrlSet | ( | XrdOucString | urls | ) |
References XrdOucString::assign(), XrdOucString::beginswith(), ConvertDNSAlias(), XrdOucString::endswith(), XrdOucString::erasefromend(), XrdOucString::erasefromstart(), Error, FALSE, XrdOucString::find(), fIsValid, fPathName, fSeed, fUrlArray, XrdClientDebug::GetDebugLevel(), XrdClientVector< T >::GetSize(), Info, XrdClientDebug::Instance(), XrdClientDebug::kDUMPDEBUG, XrdClientDebug::kHIDEBUG, XrdClientDebug::kUSERDEBUG, XrdOucString::length(), ShowUrls(), STR_NPOS, and XrdOucString::tokenize().
XrdClientUrlSet::~XrdClientUrlSet | ( | ) |
References XrdClientVector< T >::Clear(), fTmpUrlArray, fUrlArray, and XrdClientVector< T >::GetSize().
void XrdClientUrlSet::CheckPort | ( | int & | port | ) | [private] |
References Info, and XrdClientDebug::kHIDEBUG.
Referenced by ConvertDNSAlias().
void XrdClientUrlSet::ConvertDNSAlias | ( | UrlArray & | urls, |
XrdOucString | proto, | ||
XrdOucString | host, | ||
XrdOucString | file | ||
) | [private] |
References XrdOucString::c_str(), CheckPort(), XrdClientUrlInfo::File, XrdNetDNS::getAddrName(), XrdClientUrlInfo::Host, XrdClientUrlInfo::HostAddr, Info, XrdClientDebug::kHIDEBUG, XrdClientUrlInfo::Port, XrdClientUrlInfo::Proto, and XrdClientVector< T >::Push_back().
Referenced by XrdClientUrlSet().
void XrdClientUrlSet::EraseUrl | ( | XrdClientUrlInfo * | url | ) |
References XrdClientVector< T >::Erase(), fUrlArray, XrdClientVector< T >::GetSize(), Info, and XrdClientDebug::kHIDEBUG.
Referenced by XrdClientAdmin::Connect(), and XrdClient::Open().
XrdClientUrlInfo * XrdClientUrlSet::GetARandomUrl | ( | ) |
References XrdClientVector< T >::Erase(), fTmpUrlArray, GetRandom(), XrdClientVector< T >::GetSize(), and Rewind().
Referenced by XrdClientAdmin::Connect(), and XrdClient::Open().
XrdClientUrlInfo * XrdClientUrlSet::GetARandomUrl | ( | unsigned int | seed | ) |
References XrdClientVector< T >::Erase(), fTmpUrlArray, XrdClientVector< T >::GetSize(), and Rewind().
XrdOucString XrdClientUrlSet::GetFile | ( | ) | [inline] |
XrdClientUrlInfo * XrdClientUrlSet::GetNextUrl | ( | ) |
References fTmpUrlArray, XrdClientVector< T >::GetSize(), XrdClientVector< T >::Pop_back(), and Rewind().
double XrdClientUrlSet::GetRandom | ( | int | seed = 0 | ) | [private] |
Referenced by GetARandomUrl().
XrdOucString XrdClientUrlSet::GetServers | ( | ) |
bool XrdClientUrlSet::IsValid | ( | ) | [inline] |
Referenced by XrdClientAdmin::Connect(), and XrdClient::Open().
void XrdClientUrlSet::Rewind | ( | ) |
References XrdClientVector< T >::Clear(), fTmpUrlArray, fUrlArray, XrdClientVector< T >::GetSize(), and XrdClientVector< T >::Push_back().
Referenced by XrdClientAdmin::Connect(), GetARandomUrl(), GetNextUrl(), and XrdClient::Open().
void XrdClientUrlSet::ShowUrls | ( | ) |
References fUrlArray, XrdClientVector< T >::GetSize(), Info, and XrdClientDebug::kUSERDEBUG.
Referenced by XrdClientUrlSet().
int XrdClientUrlSet::Size | ( | ) | [inline] |
Referenced by XrdClientAdmin::Connect(), and XrdClient::Open().
bool XrdClientUrlSet::fIsValid [private] |
Referenced by XrdClientUrlSet().
XrdOucString XrdClientUrlSet::fPathName [private] |
Referenced by XrdClientUrlSet().
unsigned int XrdClientUrlSet::fSeed [private] |
Referenced by XrdClientUrlSet().
UrlArray XrdClientUrlSet::fTmpUrlArray [private] |
Referenced by GetARandomUrl(), GetNextUrl(), Rewind(), and ~XrdClientUrlSet().
UrlArray XrdClientUrlSet::fUrlArray [private] |
Referenced by EraseUrl(), Rewind(), ShowUrls(), XrdClientUrlSet(), and ~XrdClientUrlSet().