XRootD
XrdCl::SetXAttrFsImpl< HasHndl > Class Template Reference

SetXAttr operation (. More...

#include <XrdClFileSystemOperations.hh>

+ Inheritance diagram for XrdCl::SetXAttrFsImpl< HasHndl >:
+ Collaboration diagram for XrdCl::SetXAttrFsImpl< HasHndl >:

Public Types

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

Public Member Functions

std::string ToString ()
 
- Public Member Functions inherited from XrdCl::FileSystemOperation< SetXAttrFsImpl, HasHndl, Resp< void >, Arg< std::string >, Arg< std::string >, Arg< std::string > >
 FileSystemOperation (Ctx< FileSystem > fs, Args... args)
 
 FileSystemOperation (FileSystemOperation< SetXAttrFsImpl, from, Resp< void >, Args... > &&op)
 
virtual ~FileSystemOperation ()
 Destructor. More...
 
- Public Member Functions inherited from XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >
 ConcreteOperation (Args &&... args)
 
template<bool from>
 ConcreteOperation (ConcreteOperation< Derived, from, HdlrFactory, Args... > &&op)
 
Operation< HasHndl > * Move ()
 
template<typename Hdlr >
Derived< true > operator>> (Hdlr &&hdlr)
 
Derived< true > operator| (FinalOperation &&fo)
 Adds a final operation to the pipeline. More...
 
Derived< true > operator| (Operation< false > &&op)
 
Derived< true > operator| (Operation< false > &op)
 
Derived< true > operator| (Operation< true > &&op)
 
Derived< true > operator| (Operation< true > &op)
 
Derived< HasHndl > Timeout (uint16_t timeout)
 Set operation timeout. More...
 
Operation< true > * ToHandled ()
 
- Public Member Functions inherited from XrdCl::Operation< HasHndl >
 Operation ()
 Constructor. More...
 
template<bool from>
 Operation (Operation< from > &&op)
 Move constructor between template instances. More...
 
virtual ~Operation ()
 Destructor. More...
 

Protected Member Functions

XRootDStatus RunImpl (PipelineHandler *handler, uint16_t pipelineTimeout)
 
- Protected Member Functions inherited from XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >
Derived< true > StreamImpl (ResponseHandler *handler)
 
template<bool to>
Derived< to > Transform ()
 
- 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< Derived, HasHndl, HdlrFactory, Args >
static void AllocHandler (ConcreteOperation< Derived, false, HdlrFactory, Args... > &me)
 
static void AllocHandler (ConcreteOperation< Derived, true, HdlrFactory, Args... > &me)
 
static Derived< true > PipeImpl (ConcreteOperation< Derived, HasHndl, HdlrFactory, Args... > &me, Operation< false > &op)
 
static Derived< true > PipeImpl (ConcreteOperation< Derived, HasHndl, HdlrFactory, Args... > &me, Operation< true > &op)
 
- Protected Attributes inherited from XrdCl::FileSystemOperation< SetXAttrFsImpl, HasHndl, Resp< void >, Arg< std::string >, Arg< std::string >, Arg< std::string > >
Ctx< FileSystemfilesystem
 The file system object itself. More...
 
- Protected Attributes inherited from XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >
std::tuple< Args... > args
 Operation arguments. More...
 
uint16_t timeout
 Operation timeout. More...
 
- Protected Attributes inherited from XrdCl::Operation< HasHndl >
std::unique_ptr< PipelineHandlerhandler
 Operation handler. More...
 
bool valid
 Flag indicating if it is a valid object. More...
 

Detailed Description

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

SetXAttr operation (.

See also
FileOperation)

Definition at line 849 of file XrdClFileSystemOperations.hh.

Member Enumeration Documentation

◆ anonymous enum

template<bool HasHndl>
anonymous enum

Argument indexes in the args tuple.

Enumerator
PathArg 
NameArg 
ValueArg 

Definition at line 863 of file XrdClFileSystemOperations.hh.

Member Function Documentation

◆ RunImpl()

template<bool HasHndl>
XRootDStatus XrdCl::SetXAttrFsImpl< 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 882 of file XrdClFileSystemOperations.hh.

883  {
884  std::string &path = std::get<PathArg>( this->args ).Get();
885  std::string &name = std::get<NameArg>( this->args ).Get();
886  std::string &value = std::get<ValueArg>( this->args ).Get();
887  // wrap the arguments with a vector
888  std::vector<xattr_t> attrs;
889  attrs.push_back( xattr_t( name, value ) );
890  // wrap the PipelineHandler so the response gets unpacked properly
891  UnpackXAttrStatus *h = new UnpackXAttrStatus( handler );
892  uint16_t timeout = pipelineTimeout < this->timeout ?
893  pipelineTimeout : this->timeout;
894  XRootDStatus st = this->filesystem->SetXAttr( path, attrs, h, timeout );
895  if( !st.IsOK() ) delete h;
896  return st;
897  }
std::tuple< Args... > args
Operation arguments.
uint16_t timeout
Operation timeout.
std::unique_ptr< PipelineHandler > handler
Operation handler.
std::tuple< std::string, std::string > xattr_t
Extended attribute key - value pair.

References XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::args, XrdCl::FileSystemOperation< SetXAttrFsImpl, HasHndl, Resp< void >, Arg< std::string >, Arg< std::string >, Arg< std::string > >::filesystem, XrdCl::Operation< HasHndl >::handler, XrdCl::Status::IsOK(), and XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::timeout.

+ Here is the call graph for this function:

◆ ToString()

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

Implements XrdCl::Operation< HasHndl >.

Definition at line 868 of file XrdClFileSystemOperations.hh.

869  {
870  return "SetXAttrFsImpl";
871  }

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