XRootD
XrdCl::ReadAction Struct Reference

Read action. More...

#include <XrdClAction.hh>

+ Inheritance diagram for XrdCl::ReadAction:
+ Collaboration diagram for XrdCl::ReadAction:

Public Member Functions

 ReadAction (void *file, uint64_t offset, uint32_t size, uint16_t timeout)
 
std::string ArgStr ()
 Convert operation arguments into a string. More...
 
std::string Name ()
 Action name. More...
 
void Serialize (AnyObject *response)
 Serialize server response. More...
 
- Public Member Functions inherited from XrdCl::Action
 Action (void *file, uint16_t timeout)
 
virtual ~Action ()
 Destructor. More...
 
void RecordResult (XRootDStatus *st, AnyObject *rsp)
 Record the server response / error / timeout. More...
 
std::string ToString ()
 Convert the action / response data into csv row. More...
 

Public Attributes

uint64_t offset
 
uint32_t size
 
- Public Attributes inherited from XrdCl::Action
uint64_t id
 
std::string serialrsp
 
std::chrono::system_clock::time_point start
 
XRootDStatus status
 
std::chrono::system_clock::time_point stop
 
uint16_t timeout
 

Additional Inherited Members

- Static Public Member Functions inherited from XrdCl::Action
static double time (std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > tp)
 Convert timpoint to unix timestamp with ns. More...
 
static double timeNow ()
 Get curretn unix time in ns precision as a double. More...
 

Detailed Description

Read action.

Definition at line 223 of file XrdClAction.hh.

Constructor & Destructor Documentation

◆ ReadAction()

XrdCl::ReadAction::ReadAction ( void *  file,
uint64_t  offset,
uint32_t  size,
uint16_t  timeout 
)
inline

Definition at line 225 of file XrdClAction.hh.

226  : Action(file, timeout)
227  , offset(offset)
228  , size(size)
229  {
230  }
uint16_t timeout
Definition: XrdClAction.hh:131
Action(void *file, uint16_t timeout)
Definition: XrdClAction.hh:46

Member Function Documentation

◆ ArgStr()

std::string XrdCl::ReadAction::ArgStr ( )
inlinevirtual

Convert operation arguments into a string.

Implements XrdCl::Action.

Definition at line 234 of file XrdClAction.hh.

234 { return std::to_string(offset) + ';' + std::to_string(size); }

References offset, and size.

◆ Name()

std::string XrdCl::ReadAction::Name ( )
inlinevirtual

Action name.

Implements XrdCl::Action.

Definition at line 232 of file XrdClAction.hh.

232 { return "Read"; }

◆ Serialize()

void XrdCl::ReadAction::Serialize ( AnyObject response)
inlinevirtual

Serialize server response.

Reimplemented from XrdCl::Action.

Definition at line 236 of file XrdClAction.hh.

237  {
238  if (!response)
239  return;
240  ChunkInfo* ptr = nullptr;
241  response->Get(ptr);
242  serialrsp = std::to_string(ptr->length);
243  }
std::string serialrsp
Definition: XrdClAction.hh:134

References XrdCl::AnyObject::Get(), XrdCl::ChunkInfo::length, and XrdCl::Action::serialrsp.

+ Here is the call graph for this function:

Member Data Documentation

◆ offset

uint64_t XrdCl::ReadAction::offset

Definition at line 245 of file XrdClAction.hh.

Referenced by ArgStr().

◆ size

uint32_t XrdCl::ReadAction::size

Definition at line 246 of file XrdClAction.hh.

Referenced by ArgStr().


The documentation for this struct was generated from the following file: