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

## Constructor & Destructor Documentation

## VectorReadAction()

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

inline

Definition at line 360 of file XrdClAction.hh.

: Action(file, timeout)
, req(chunks)
{
}
Action
int Action
Definition XrdSecpwdSrvAdmin.cc:155
XrdCl::Action::timeout
uint16_t timeout
Definition XrdClAction.hh:131
XrdCl::VectorReadAction::req
ChunkList req
Definition XrdClAction.hh:395

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 | ( |  | ) |

inline virtual

Convert operation arguments into a string.

Implements XrdCl::Action.

Definition at line 368 of file XrdClAction.hh.

{
if (req.empty())
return {};
std::stringstream ss;
ss << req[0].offset << ";" << req[0].length;
for (size_t i = 1; i < req.size(); ++i)
ss << ";" << req[i].offset << ";" << req[i].length;
return ss.str();
}

References req.

## Name()

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

inline virtual

Action name.

Implements XrdCl::Action.

Definition at line 366 of file XrdClAction.hh.

{ return "VectorRead"; }

## Serialize()

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

inline virtual

Serialize server response.

Reimplemented from XrdCl::Action.

Definition at line 379 of file XrdClAction.hh.

{
if (!response)
return;
VectorReadInfo* ptr = nullptr;
response->Get(ptr);
if (!ptr)
return;
std::stringstream ss;
ss << ptr->GetSize();
auto& chunks = ptr->GetChunks();
for (auto& ch : chunks)
ss << ';' << ch.offset << ';' << ch.length;
serialrsp = ss.str();
}
XrdCl::Action::serialrsp
std::string serialrsp
Definition XrdClAction.hh:134

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

Referenced by VectorReadAction(), and ArgStr().

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

- XrdClAction.hh