XRootD
XrdCl::LocationInfo Class Reference

Path location info. More...

#include <XrdClXRootDResponses.hh>

+ Collaboration diagram for XrdCl::LocationInfo:

Classes

class  Location
 Location. More...
 

Public Types

enum  AccessType {
  Read ,
  ReadWrite
}
 Describes the allowed access type for the file at given location. More...
 
typedef LocationList::const_iterator ConstIterator
 Iterator over locations. More...
 
typedef LocationList::iterator Iterator
 Iterator over locations. More...
 
typedef std::vector< LocationLocationList
 List of locations. More...
 
enum  LocationType {
  ManagerOnline ,
  ManagerPending ,
  ServerOnline ,
  ServerPending
}
 Describes the node type and file status for a given location. More...
 

Public Member Functions

 LocationInfo ()
 Constructor. More...
 
void Add (const Location &location)
 Add a location. More...
 
LocationAt (uint32_t index)
 Get the location at index. More...
 
Iterator Begin ()
 Get the location begin iterator. More...
 
ConstIterator Begin () const
 Get the location begin iterator. More...
 
Iterator End ()
 Get the location end iterator. More...
 
ConstIterator End () const
 Get the location end iterator. More...
 
uint32_t GetSize () const
 Get number of locations. More...
 
bool ParseServerResponse (const char *data)
 Parse server response and fill up the object. More...
 

Detailed Description

Path location info.

Definition at line 43 of file XrdClXRootDResponses.hh.

Member Typedef Documentation

◆ ConstIterator

typedef LocationList::const_iterator XrdCl::LocationInfo::ConstIterator

Iterator over locations.

Definition at line 142 of file XrdClXRootDResponses.hh.

◆ Iterator

typedef LocationList::iterator XrdCl::LocationInfo::Iterator

Iterator over locations.

Definition at line 137 of file XrdClXRootDResponses.hh.

◆ LocationList

List of locations.

Definition at line 132 of file XrdClXRootDResponses.hh.

Member Enumeration Documentation

◆ AccessType

Describes the allowed access type for the file at given location.

Enumerator
Read 

read access is allowed

ReadWrite 

write access is allowed

Definition at line 60 of file XrdClXRootDResponses.hh.

61  {
62  Read,
63  ReadWrite
64  };
@ Read
read access is allowed
@ ReadWrite
write access is allowed

◆ LocationType

Describes the node type and file status for a given location.

Enumerator
ManagerOnline 

manager node where the file is online

ManagerPending 

manager node where the file is pending to be online

ServerOnline 

server node where the file is online

ServerPending 

server node where the file is pending to be online

Definition at line 49 of file XrdClXRootDResponses.hh.

50  {
53  ServerOnline,
55  };
@ ServerPending
server node where the file is pending to be online
@ ManagerOnline
manager node where the file is online
@ ServerOnline
server node where the file is online
@ ManagerPending
manager node where the file is pending to be online

Constructor & Destructor Documentation

◆ LocationInfo()

XrdCl::LocationInfo::LocationInfo ( )

Constructor.

Definition at line 31 of file XrdClXRootDResponses.cc.

32  {
33  }

Member Function Documentation

◆ Add()

void XrdCl::LocationInfo::Add ( const Location location)
inline

Add a location.

Definition at line 200 of file XrdClXRootDResponses.hh.

201  {
202  pLocations.push_back( location );
203  }

Referenced by XrdCl::ServerSpaceInfo::SelectLocations().

+ Here is the caller graph for this function:

◆ At()

Location& XrdCl::LocationInfo::At ( uint32_t  index)
inline

Get the location at index.

Definition at line 160 of file XrdClXRootDResponses.hh.

161  {
162  return pLocations[index];
163  }

Referenced by XrdCl::FileSystem::DirList(), XrdCl::ServerSpaceInfo::SelectLocations(), and XrdFfsPosix_mkdir().

+ Here is the caller graph for this function:

◆ Begin() [1/2]

Iterator XrdCl::LocationInfo::Begin ( )
inline

Get the location begin iterator.

Definition at line 168 of file XrdClXRootDResponses.hh.

169  {
170  return pLocations.begin();
171  }

Referenced by DoLocate(), XrdPosixAdmin::FanOut(), and XrdCl::FileSystemUtils::GetSpaceInfo().

+ Here is the caller graph for this function:

◆ Begin() [2/2]

ConstIterator XrdCl::LocationInfo::Begin ( ) const
inline

Get the location begin iterator.

Definition at line 176 of file XrdClXRootDResponses.hh.

177  {
178  return pLocations.begin();
179  }

◆ End() [1/2]

Iterator XrdCl::LocationInfo::End ( )
inline

Get the location end iterator.

Definition at line 184 of file XrdClXRootDResponses.hh.

185  {
186  return pLocations.end();
187  }

Referenced by DoLocate(), XrdPosixAdmin::FanOut(), and XrdCl::FileSystemUtils::GetSpaceInfo().

+ Here is the caller graph for this function:

◆ End() [2/2]

ConstIterator XrdCl::LocationInfo::End ( ) const
inline

Get the location end iterator.

Definition at line 192 of file XrdClXRootDResponses.hh.

193  {
194  return pLocations.end();
195  }

◆ GetSize()

uint32_t XrdCl::LocationInfo::GetSize ( ) const
inline

Get number of locations.

Definition at line 152 of file XrdClXRootDResponses.hh.

153  {
154  return pLocations.size();
155  }

Referenced by XrdCl::FileSystem::DirList(), XrdPosixAdmin::FanOut(), and XrdCl::ServerSpaceInfo::SelectLocations().

+ Here is the caller graph for this function:

◆ ParseServerResponse()

bool XrdCl::LocationInfo::ParseServerResponse ( const char *  data)

Parse server response and fill up the object.

Definition at line 38 of file XrdClXRootDResponses.cc.

39  {
40  if( !data || strlen( data ) == 0 )
41  return false;
42 
43  std::vector<std::string> locations;
44  std::vector<std::string>::iterator it;
45  Utils::splitString( locations, data, " " );
46  for( it = locations.begin(); it != locations.end(); ++it )
47  if( ProcessLocation( *it ) == false )
48  return false;
49  return true;
50  }
static void splitString(Container &result, const std::string &input, const std::string &delimiter)
Split a string.
Definition: XrdClUtils.hh:56

References XrdCl::Utils::splitString().

+ Here is the call graph for this function:

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