XRootD
Loading...
Searching...
No Matches
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.
 
std::string Name ()
 Action name.
 
void Serialize (AnyObject *response)
 Serialize server response.
 
- Public Member Functions inherited from XrdCl::Action
 Action (void *file, uint16_t timeout)
 
virtual ~Action ()
 Destructor.
 
void RecordResult (XRootDStatus *st, AnyObject *rsp)
 Record the server response / error / timeout.
 
std::string ToString ()
 Convert the action / response data into csv row.
 

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.
 
static double timeNow ()
 Get curretn unix time in ns precision as a double.
 

Detailed Description

Read action.

Definition at line 225 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 227 of file XrdClAction.hh.

228 : Action(file, timeout)
229 , offset(offset)
230 , size(size)
231 {
232 }
int Action
uint16_t timeout

Member Function Documentation

◆ ArgStr()

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

Convert operation arguments into a string.

Implements XrdCl::Action.

Definition at line 236 of file XrdClAction.hh.

236{ 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 234 of file XrdClAction.hh.

234{ return "Read"; }

◆ Serialize()

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

Serialize server response.

Reimplemented from XrdCl::Action.

Definition at line 238 of file XrdClAction.hh.

239 {
240 if (!response)
241 return;
242 ChunkInfo* ptr = nullptr;
243 response->Get(ptr);
244 serialrsp = std::to_string(ptr ? ptr->length : 0);
245 }
std::string serialrsp

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 247 of file XrdClAction.hh.

Referenced by ArgStr().

◆ size

uint32_t XrdCl::ReadAction::size

Definition at line 248 of file XrdClAction.hh.

Referenced by ArgStr().


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