CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
publish::SyncItemTar Class Reference

#include <sync_item_tar.h>

Inheritance diagram for publish::SyncItemTar:
Collaboration diagram for publish::SyncItemTar:

Public Member Functions

virtual catalog::DirectoryEntryBase CreateBasicCatalogDirent () const
 
virtual IngestionSourceCreateIngestionSource () const
 
virtual void MakePlaceholderDirectory () const
 
virtual SyncItemType GetScratchFiletype () const
 
virtual bool IsType (const SyncItemType expected_type) const
 
virtual void StatScratch (const bool refresh=false) const
 
- Public Member Functions inherited from publish::SyncItem
 SyncItem ()
 
virtual ~SyncItem ()
 
bool IsDirectory () const
 
bool WasDirectory () const
 
bool IsRegularFile () const
 
bool WasRegularFile () const
 
bool IsSymlink () const
 
bool WasSymlink () const
 
bool IsNew () const
 
bool IsTouched () const
 
bool IsCharacterDevice () const
 
bool IsBlockDevice () const
 
bool IsFifo () const
 
bool IsSocket () const
 
bool IsGraftMarker () const
 
bool IsExternalData () const
 
bool IsDirectIo () const
 
bool IsWhiteout () const
 
bool IsCatalogMarker () const
 
bool IsOpaqueDirectory () const
 
bool IsSpecialFile () const
 
bool WasSpecialFile () const
 
unsigned int GetRdevMajor () const
 
unsigned int GetRdevMinor () const
 
bool HasCatalogMarker () const
 
bool HasGraftMarker () const
 
bool HasCompressionAlgorithm () const
 
bool IsValidGraft () const
 
bool IsChunkedGraft () const
 
const FileChunkListGetGraftChunks () const
 
shash::Any GetContentHash () const
 
void SetContentHash (const shash::Any &hash)
 
bool HasContentHash () const
 
void SetExternalData (bool val)
 
void SetDirectIo (bool val)
 
zlib::Algorithms GetCompressionAlgorithm () const
 
void SetCompressionAlgorithm (const zlib::Algorithms &alg)
 
std::string GetRelativePath () const
 
std::string GetRdOnlyPath () const
 
std::string GetUnionPath () const
 
std::string GetScratchPath () const
 
void MarkAsWhiteout (const std::string &actual_filename)
 
void MarkAsOpaqueDirectory ()
 
void MaskHardlink ()
 
bool HasHardlinks () const
 
unsigned int GetRdOnlyLinkcount () const
 
uint64_t GetRdOnlyInode () const
 
unsigned int GetUnionLinkcount () const
 
uint64_t GetUnionInode () const
 
uint64_t GetScratchSize () const
 
uint64_t GetRdOnlySize () const
 
std::string filename () const
 
std::string relative_parent_path () const
 
void SetCatalogMarker ()
 
bool operator== (const SyncItem &other) const
 

Protected Member Functions

 SyncItemTar (const std::string &relative_parent_path, const std::string &filename, struct archive *archive, struct archive_entry *entry, Signal *read_archive_signal, const SyncUnion *union_engine)
 
- Protected Member Functions inherited from publish::SyncItem
 SyncItem (const std::string &relative_parent_path, const std::string &filename, const SyncUnion *union_engine, const SyncItemType entry_type)
 
platform_stat64 GetUnionStat () const
 
SyncItemType GetRdOnlyFiletype () const
 
SyncItemType GetUnionFiletype () const
 
bool WasType (const SyncItemType expected_type) const
 
SyncItemType GetGenericFiletype (const EntryStat &stat) const
 
void CheckMarkerFiles ()
 

Private Member Functions

platform_stat64 GetStatFromTar () const
 

Private Attributes

struct archive * archive_
 
struct archive_entry * archive_entry_
 
platform_stat64 tar_stat_
 
bool obtained_tar_stat_
 
Signalread_archive_signal_
 

Friends

class SyncUnionTarball
 

Additional Inherited Members

- Static Protected Member Functions inherited from publish::SyncItem
static void StatGeneric (const std::string &path, EntryStat *info, const bool refresh)
 
- Protected Attributes inherited from publish::SyncItem
SyncItemType rdonly_type_
 
EntryStat scratch_stat_
 
ssize_t graft_size_
 
shash::Any content_hash_
 
SyncItemType scratch_type_
 

Detailed Description

Definition at line 21 of file sync_item_tar.h.

Constructor & Destructor Documentation

publish::SyncItemTar::SyncItemTar ( const std::string &  relative_parent_path,
const std::string &  filename,
struct archive *  archive,
struct archive_entry *  entry,
Signal read_archive_signal,
const SyncUnion union_engine 
)
protected

Definition at line 18 of file sync_item_tar.cc.

Here is the call graph for this function:

Member Function Documentation

catalog::DirectoryEntryBase publish::SyncItemTar::CreateBasicCatalogDirent ( ) const
virtual

Generates a DirectoryEntry that can be directly stored into a catalog db. Note: this sets the inode fields to kInvalidInode as well as the link count to 1 if MaskHardlink() has been called before (cf. OverlayFS)

Returns
a DirectoryEntry structure to be written into a catalog

Implements publish::SyncItem.

Definition at line 106 of file sync_item_tar.cc.

Here is the call graph for this function:

IngestionSource * publish::SyncItemTar::CreateIngestionSource ( ) const
virtual

Implements publish::SyncItem.

Definition at line 145 of file sync_item_tar.cc.

Here is the call graph for this function:

SyncItemType publish::SyncItemTar::GetScratchFiletype ( ) const
virtual

Implements publish::SyncItem.

Definition at line 38 of file sync_item_tar.cc.

Referenced by IsType().

Here is the call graph for this function:

Here is the caller graph for this function:

platform_stat64 publish::SyncItemTar::GetStatFromTar ( ) const
private

Definition at line 82 of file sync_item_tar.cc.

Referenced by StatScratch(), and SyncItemTar().

Here is the call graph for this function:

Here is the caller graph for this function:

bool publish::SyncItemTar::IsType ( const SyncItemType  expected_type) const
virtual

Checks if the SyncItem is the given file type (file, dir, symlink, ...) in the union file system volume. Hence: After the publish operation, the file will be this type in CVMFS.

Parameters
expected_typethe file type to be checked against
Returns
true if file type matches the expected type

Implements publish::SyncItem.

Definition at line 75 of file sync_item_tar.cc.

Here is the call graph for this function:

virtual void publish::SyncItemTar::MakePlaceholderDirectory ( ) const
inlinevirtual

Implements publish::SyncItem.

Definition at line 27 of file sync_item_tar.h.

void publish::SyncItemTar::StatScratch ( const bool  refresh = false) const
virtual

Implements publish::SyncItem.

Definition at line 31 of file sync_item_tar.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class SyncUnionTarball
friend

Definition at line 22 of file sync_item_tar.h.

Member Data Documentation

struct archive* publish::SyncItemTar::archive_
private

Definition at line 39 of file sync_item_tar.h.

Referenced by CreateIngestionSource().

struct archive_entry* publish::SyncItemTar::archive_entry_
private
bool publish::SyncItemTar::obtained_tar_stat_
mutableprivate

Definition at line 43 of file sync_item_tar.h.

Referenced by CreateBasicCatalogDirent(), and GetStatFromTar().

Signal* publish::SyncItemTar::read_archive_signal_
private

Definition at line 44 of file sync_item_tar.h.

Referenced by CreateIngestionSource().

platform_stat64 publish::SyncItemTar::tar_stat_
mutableprivate

Definition at line 42 of file sync_item_tar.h.

Referenced by CreateBasicCatalogDirent(), and GetStatFromTar().


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