Loading...
Searching...
No Matches
XrdCl::ServerSpaceInfo Class Reference

`#include <XrdClEcHandler.hh>`

Collaboration diagram for XrdCl::ServerSpaceInfo:

## Public Member Functions

| ServerSpaceInfo ()
| ~ServerSpaceInfo ()
void | Dump ()
void | SelectLocations (XrdCl::LocationInfo &oldList, XrdCl::LocationInfo &newList, uint32_t n)

## Detailed Description

Definition at line 45 of file XrdClEcHandler.hh.

## Constructor & Destructor Documentation

## ServerSpaceInfo()

XrdCl::ServerSpaceInfo::ServerSpaceInfo | ( |  | ) |

Definition at line 15 of file XrdClEcHandler.cc.

{
if (getenv("XrdCl_EC_X_RATIO"))
{
xRatio = atoi(getenv("XrdCl_EC_X_RATIO"));
}
else
{
xRatio = 1;
}
};

## ~ServerSpaceInfo()

XrdCl::ServerSpaceInfo::~ServerSpaceInfo | ( |  | ) |

inline

Definition at line 48 of file XrdClEcHandler.hh.

{};

## Member Function Documentation

## Dump()

void XrdCl::ServerSpaceInfo::Dump | ( |  | ) |

Definition at line 68 of file XrdClEcHandler.cc.

{
for (uint32_t j=0; j<ServerList.size(); j++)
{
ServerList[j].Dump();
}
};

## SelectLocations()

void XrdCl::ServerSpaceInfo::SelectLocations | ( | XrdCl::LocationInfo & | oldList,
|  | XrdCl::LocationInfo & | newList,
|  | uint32_t | n )

Definition at line 26 of file XrdClEcHandler.cc.

{
TryInitExportPaths();
AddServers(oldList);
UpdateSpaceInfo();
lock.lock();
if (oldList.GetSize() > n && ! BlindSelect())
{
for (uint32_t j=0; j<ServerList.size(); j++)
{
for (uint32_t i=0; i<oldList.GetSize(); i++)
{
if (ServerList[j].address == oldList.At(i).GetAddress() &&
oldList.At(i).GetType() == XrdCl::LocationInfo::ServerOnline)
{
newList.Add(oldList.At(i));
if (newList.GetSize() == n)
{
lock.unlock();
return;
}
}
}
}
}
else
{
for (uint32_t i=0; i<oldList.GetSize(); i++)
{
if (Exists(oldList.At(i)) &&
oldList.At(i).GetType() == XrdCl::LocationInfo::ServerOnline)
{
newList.Add(oldList.At(i));
}
}
}
lock.unlock();
}
Exists
bool Exists
Definition XrdSecgsiProxy.cc:97
XrdCl::LocationInfo::Location::GetType
LocationType GetType() const
Get location type.
Definition XrdClXRootDResponses.hh:94
XrdCl::LocationInfo::Location::GetAddress
const std::string & GetAddress() const
Get address.
Definition XrdClXRootDResponses.hh:86
XrdCl::LocationInfo::GetSize
uint32_t GetSize() const
Get number of locations.
Definition XrdClXRootDResponses.hh:152
XrdCl::LocationInfo::At
Location & At(uint32_t index)
Get the location at index.
Definition XrdClXRootDResponses.hh:160
XrdCl::LocationInfo::Add
void Add(const Location &location)
Add a location.
Definition XrdClXRootDResponses.hh:200
XrdCl::LocationInfo::ServerOnline
@ ServerOnline
server node where the file is online
Definition XrdClXRootDResponses.hh:53

References XrdCl::LocationInfo::Add(), XrdCl::LocationInfo::At(), Exists, XrdCl::LocationInfo::Location::GetAddress(), XrdCl::LocationInfo::GetSize(), XrdCl::LocationInfo::Location::GetType(), and XrdCl::LocationInfo::ServerOnline.

Here is the call graph for this function:

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

- XrdClEcHandler.hh
- XrdClEcHandler.cc