XRootD
Loading...
Searching...
No Matches
XrdCl::SetXAttrImpl< HasHndl > Class Template Reference

SetXAttr operation (. More...

#include <XrdClFileOperations.hh>

Inheritance diagram for XrdCl::SetXAttrImpl< HasHndl >:
Collaboration diagram for XrdCl::SetXAttrImpl< HasHndl >:

Public Types

enum  {
  NameArg ,
  ValueArg
}
 Argument indexes in the args tuple. More...

Public Member Functions

std::string ToString ()
Public Member Functions inherited from XrdCl::FileOperation< SetXAttrImpl, HasHndl, Resp< void >, Arg< std::string >, Arg< std::string > >
virtual ~FileOperation ()
 Destructor.
Public Member Functions inherited from XrdCl::ConcreteOperation< SetXAttrImpl, HasHndl, Resp< void >, Arguments... >
Operation< HasHndl > * Move ()
SetXAttrImpl< true > operator>> (Hdlr &&hdlr)
SetXAttrImpl< true > operator| (Operation< true > &op)
SetXAttrImpl< HasHndl > Timeout (uint16_t timeout)
 Set operation timeout.
Operation< true > * ToHandled ()
Public Member Functions inherited from XrdCl::Operation< HasHndl >
 Operation ()
 Constructor.
template<bool from>
 Operation (Operation< from > &&op)
 Move constructor between template instances.
virtual ~Operation ()
 Destructor.

Protected Member Functions

XRootDStatus RunImpl (PipelineHandler *handler, uint16_t pipelineTimeout)
Protected Member Functions inherited from XrdCl::ConcreteOperation< SetXAttrImpl, HasHndl, Resp< void >, Arguments... >
SetXAttrImpl< true > StreamImpl (ResponseHandler *handler)
SetXAttrImpl< toTransform ()
Protected Member Functions inherited from XrdCl::Operation< HasHndl >
void AddOperation (Operation< true > *op)
void Run (Timeout timeout, std::promise< XRootDStatus > prms, std::function< void(const XRootDStatus &)> final)

Additional Inherited Members

Static Protected Member Functions inherited from XrdCl::ConcreteOperation< SetXAttrImpl, HasHndl, Resp< void >, Arguments... >
static void AllocHandler (ConcreteOperation< SetXAttrImpl, true, Resp< void >, Args... > &me)
static SetXAttrImpl< true > PipeImpl (ConcreteOperation< SetXAttrImpl, HasHndl, Resp< void >, Args... > &me, Operation< true > &op)
Protected Attributes inherited from XrdCl::FileOperation< SetXAttrImpl, HasHndl, Resp< void >, Arg< std::string >, Arg< std::string > >
Ctx< Filefile
 The file object itself.
Protected Attributes inherited from XrdCl::ConcreteOperation< SetXAttrImpl, HasHndl, Resp< void >, Arguments... >
std::tuple< Args... > args
 Operation arguments.
uint16_t timeout
 Operation timeout.
Protected Attributes inherited from XrdCl::Operation< HasHndl >
std::unique_ptr< PipelineHandlerhandler
 Operation handler.
bool valid
 Flag indicating if it is a valid object.

Detailed Description

template<bool HasHndl>
class XrdCl::SetXAttrImpl< HasHndl >

SetXAttr operation (.

See also
FileOperation)

Definition at line 967 of file XrdClFileOperations.hh.

Member Enumeration Documentation

◆ anonymous enum

template<bool HasHndl>
anonymous enum

Argument indexes in the args tuple.

Enumerator
NameArg 
ValueArg 

Definition at line 981 of file XrdClFileOperations.hh.

Member Function Documentation

◆ RunImpl()

template<bool HasHndl>
XRootDStatus XrdCl::SetXAttrImpl< HasHndl >::RunImpl ( PipelineHandler * handler,
uint16_t pipelineTimeout )
inlineprotectedvirtual

RunImpl operation (

See also
Operation)
Parameters
params: container with parameters forwarded from previous operation
Returns
: status of the operation

Implements XrdCl::Operation< HasHndl >.

Definition at line 1000 of file XrdClFileOperations.hh.

1001 {
1002 std::string &name = std::get<NameArg>( this->args ).Get();
1003 std::string &value = std::get<ValueArg>( this->args ).Get();
1004 // wrap the arguments with a vector
1006 attrs.push_back( xattr_t( name, value ) );
1007 // wrap the PipelineHandler so the response gets unpacked properly
1010 pipelineTimeout : this->timeout;
1011 XRootDStatus st = this->file->SetXAttr( attrs, h, timeout );
1012 if( !st.IsOK() ) delete h;
1013 return st;
1014 }
std::unique_ptr< PipelineHandler > handler
Operation handler.
SetXAttr operation (.
std::tuple< std::string, std::string > xattr_t
Extended attribute key - value pair.

References XrdCl::ConcreteOperation< SetXAttrImpl, HasHndl, Resp< void >, Arguments... >::args, XrdCl::Operation< HasHndl >::handler, XrdCl::Status::IsOK(), XrdCl::NullRef< Response >::value, and XrdCl::ConcreteOperation< SetXAttrImpl, HasHndl, Resp< void >, Arguments... >::timeout.

Here is the call graph for this function:

◆ ToString()

template<bool HasHndl>
std::string XrdCl::SetXAttrImpl< HasHndl >::ToString ( )
inlinevirtual
Returns
: name of the operation (
See also
Operation)

Implements XrdCl::Operation< HasHndl >.

Definition at line 986 of file XrdClFileOperations.hh.

987 {
988 return "SetXAttrImpl";
989 }

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