XRootD
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.

15  {
16  if (getenv("XrdCl_EC_X_RATIO"))
17  {
18  xRatio = atoi(getenv("XrdCl_EC_X_RATIO"));
19  }
20  else
21  {
22  xRatio = 1;
23  }
24  };

◆ ~ServerSpaceInfo()

XrdCl::ServerSpaceInfo::~ServerSpaceInfo ( )
inline

Definition at line 48 of file XrdClEcHandler.hh.

48 {};

Member Function Documentation

◆ Dump()

void XrdCl::ServerSpaceInfo::Dump ( )

Definition at line 68 of file XrdClEcHandler.cc.

69  {
70  for (uint32_t j=0; j<ServerList.size(); j++)
71  {
72  ServerList[j].Dump();
73  }
74  };

◆ SelectLocations()

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

Definition at line 26 of file XrdClEcHandler.cc.

29  {
30  TryInitExportPaths();
31  AddServers(oldList);
32  UpdateSpaceInfo();
33 
34  lock.lock();
35  if (oldList.GetSize() > n && ! BlindSelect())
36  {
37  for (uint32_t j=0; j<ServerList.size(); j++)
38  {
39  for (uint32_t i=0; i<oldList.GetSize(); i++)
40  {
41  if (ServerList[j].address == oldList.At(i).GetAddress() &&
43  {
44  newList.Add(oldList.At(i));
45  if (newList.GetSize() == n)
46  {
47  lock.unlock();
48  return;
49  }
50  }
51  }
52  }
53  }
54  else
55  {
56  for (uint32_t i=0; i<oldList.GetSize(); i++)
57  {
58  if (Exists(oldList.At(i)) &&
60  {
61  newList.Add(oldList.At(i));
62  }
63  }
64  }
65  lock.unlock();
66  }
LocationType GetType() const
Get location type.
const std::string & GetAddress() const
Get address.
uint32_t GetSize() const
Get number of locations.
Location & At(uint32_t index)
Get the location at index.
void Add(const Location &location)
Add a location.
@ ServerOnline
server node where the file is online

References XrdCl::LocationInfo::Add(), XrdCl::LocationInfo::At(), 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: