XRootD
Loading...
Searching...
No Matches
XrdCl::VectorReadAction Struct Reference

VectorRead action. More...

#include <XrdClAction.hh>

Inheritance diagram for XrdCl::VectorReadAction:
Collaboration diagram for XrdCl::VectorReadAction:

Public Member Functions

 VectorReadAction (void *file, const ChunkList &chunks, 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

ChunkList req
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

VectorRead action.

Definition at line 353 of file XrdClAction.hh.

Constructor & Destructor Documentation

◆ VectorReadAction()

XrdCl::VectorReadAction::VectorReadAction ( void * file,
const ChunkList & chunks,
uint16_t timeout )
inline

Definition at line 355 of file XrdClAction.hh.

356 : Action(file, timeout)
357 , req(chunks)
358 {
359 }
int Action
uint16_t timeout

References XrdCl::Action::Action(), req, and XrdCl::Action::timeout.

Here is the call graph for this function:

Member Function Documentation

◆ ArgStr()

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

Convert operation arguments into a string.

Implements XrdCl::Action.

Definition at line 363 of file XrdClAction.hh.

364 {
365 if (req.empty())
366 return {};
367 std::stringstream ss;
368 ss << req[0].offset << ";" << req[0].length;
369 for (size_t i = 1; i < req.size(); ++i)
370 ss << ";" << req[i].offset << ";" << req[i].length;
371 return ss.str();
372 }

References req.

◆ Name()

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

Action name.

Implements XrdCl::Action.

Definition at line 361 of file XrdClAction.hh.

361{ return "VectorRead"; }

◆ Serialize()

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

Serialize server response.

Reimplemented from XrdCl::Action.

Definition at line 374 of file XrdClAction.hh.

375 {
376 if (!response)
377 return;
378 VectorReadInfo* ptr = nullptr;
379 response->Get(ptr);
380 std::stringstream ss;
381 ss << ptr->GetSize();
382 auto& chunks = ptr->GetChunks();
383 for (auto& ch : chunks)
384 ss << ';' << ch.offset << ';' << ch.length;
385 serialrsp = ss.str();
386 }
std::string serialrsp

References XrdCl::AnyObject::Get(), XrdCl::VectorReadInfo::GetChunks(), XrdCl::VectorReadInfo::GetSize(), and XrdCl::Action::serialrsp.

Here is the call graph for this function:

Member Data Documentation

◆ req

ChunkList XrdCl::VectorReadAction::req

Definition at line 388 of file XrdClAction.hh.

Referenced by VectorReadAction(), and ArgStr().


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