CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BaseMagicXattr Class Referenceabstract

#include <magic_xattr.h>

Inheritance diagram for BaseMagicXattr:
Collaboration diagram for BaseMagicXattr:

Public Member Functions

 BaseMagicXattr ()
 
virtual bool PrepareValueFenced ()
 
virtual std::string GetValue ()=0
 
virtual MagicXattrFlavor GetXattrFlavor ()
 
void Lock (PathString path, catalog::DirectoryEntry *dirent)
 
void Release ()
 
virtual ~BaseMagicXattr ()
 

Protected Attributes

MountPointmount_point_
 
PathString path_
 
catalog::DirectoryEntrydirent_
 
pthread_mutex_t access_mutex_
 

Friends

class MagicXattrManager
 

Detailed Description

This is a base class for magic extended attribute. Concrete extended attributes inherit from this class. It should be generally used only in cooperation with MagicXattrManager. It contains an access mutex. Users should use Lock() and Release() before and after usage (Lock() is called implicitly in MagicXattrManager).

To read out the attribute value, do: 0. Get an instance through MagicXattrManager::Get()

  1. Call PrepareValueFenced() inside FuseRemounter::fence()
  2. Call GetValue() to get the actual value (can be called outside the fence)

Definition at line 39 of file magic_xattr.h.

Constructor & Destructor Documentation

BaseMagicXattr::BaseMagicXattr ( )
inline

Definition at line 43 of file magic_xattr.h.

Here is the call graph for this function:

virtual BaseMagicXattr::~BaseMagicXattr ( )
inlinevirtual

Definition at line 73 of file magic_xattr.h.

Member Function Documentation

virtual MagicXattrFlavor BaseMagicXattr::GetXattrFlavor ( )
inlinevirtual

Reimplemented in AuthzMagicXattr, SymlinkMagicXattr, RegularMagicXattr, and WithHashMagicXattr.

Definition at line 60 of file magic_xattr.h.

void BaseMagicXattr::Lock ( PathString  path,
catalog::DirectoryEntry dirent 
)
inline

Definition at line 62 of file magic_xattr.h.

Referenced by MagicXattrManager::GetLocked(), and MagicXattrRAIIWrapper::MagicXattrRAIIWrapper().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BaseMagicXattr::PrepareValueFenced ( )
inlinevirtual
void BaseMagicXattr::Release ( )
inline

Definition at line 68 of file magic_xattr.h.

Referenced by MagicXattrRAIIWrapper::~MagicXattrRAIIWrapper().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class MagicXattrManager
friend

Definition at line 40 of file magic_xattr.h.

Member Data Documentation

pthread_mutex_t BaseMagicXattr::access_mutex_
protected

Definition at line 80 of file magic_xattr.h.

Referenced by BaseMagicXattr(), Lock(), and Release().


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