15 #ifndef CVMFS_CATALOG_RW_H_
16 #define CVMFS_CATALOG_RW_H_
28 namespace swissknife {
34 class WritableCatalogManager;
45 const bool is_not_root =
false);
49 const std::string &file,
52 const bool is_not_root =
false);
63 const std::string &entry_path,
64 const std::string &parent_path);
71 const std::string &path)
76 void IncLinkcount(
const std::string &path_within_group,
const int delta);
104 void SetBranch(
const std::string &branch_name);
106 void SetTTL(
const uint64_t new_ttl);
120 const std::string &path)
128 const std::string &path)
178 const std::string &dir_structure_root,
180 std::vector<std::string> *grand_child_mountpoints)
184 grand_child_mountpoints);
187 const std::string dir_structure_root,
189 std::vector<std::string> *grand_child_mountpoints);
207 #endif // CVMFS_CATALOG_RW_H_
void MoveFileChunksToNested(const std::string &full_path, const shash::Algorithms algorithm, WritableCatalog *new_nested_catalog)
void AddEntry(const DirectoryEntry &entry, const XattrList &xattrs, const std::string &path)
void RemoveFileChunks(const std::string &entry_path)
SqlDirentInsert * sql_insert_
void set_dirty_children(const int count)
static const double kMaximalFreePageRatio
uint32_t GetMaxLinkId() const
void UpdateNestedCatalog(const std::string &path, const shash::Any &hash, const uint64_t size, const DeltaCounters &child_counters)
void InsertBindMountpoint(const std::string &mountpoint, const shash::Any content_hash, const uint64_t size)
void UpdateLastModified()
CatalogDatabase::OpenMode DatabaseOpenMode() const
void InsertNestedCatalog(const std::string &mountpoint, Catalog *attached_reference, const shash::Any content_hash, const uint64_t size)
void RemoveBindMountpoint(const std::string &mountpoint)
void TouchEntry(const DirectoryEntryBase &entry, const XattrList &xattrs, const shash::Md5 &path_hash)
assert((mem||(size==0))&&"Out Of Memory")
SqlChunksCount * sql_chunks_count_
void CopyCatalogsToParent()
void SetPreviousRevision(const shash::Any &hash)
SqlChunkInsert * sql_chunk_insert_
void MoveToNestedRecursively(const std::string dir_structure_root, WritableCatalog *new_nested_catalog, std::vector< std::string > *grand_child_mountpoints)
std::vector< WritableCatalog * > WritableCatalogList
SqlChunksRemove * sql_chunks_remove_
void MakeTransitionPoint(const std::string &mountpoint)
SqlIncLinkcount * sql_inc_linkcount_
void MoveToNested(const std::string &dir_structure_root, WritableCatalog *new_nested_catalog, std::vector< std::string > *grand_child_mountpoints)
static WritableCatalog * AttachFreely(const std::string &root_path, const std::string &file, const shash::Any &catalog_hash, Catalog *parent=NULL, const bool is_not_root=false)
void AddFileChunk(const std::string &entry_path, const FileChunk &chunk)
void FinalizePreparedStatements()
atomic_int32 dirty_children_
SqlDirentUpdate * sql_update_
void SetTTL(const uint64_t new_ttl)
SqlMaxHardlinkGroup * sql_max_link_id_
PathString mountpoint() const
WritableCatalog(const std::string &path, const shash::Any &catalog_hash, Catalog *parent, const bool is_not_root=false)
static const double kMaximalRowIdWasteRatio
void RemoveNestedCatalog(const std::string &mountpoint, Catalog **attached_reference)
bool SetVOMSAuthz(const std::string &voms_authz)
void AddEntry(const DirectoryEntry &entry, const XattrList &xattr, const std::string &entry_path, const std::string &parent_path)
SqlDirentTouch * sql_touch_
void InitPreparedStatements()
SqlDirentUnlink * sql_unlink_
void SetBranch(const std::string &branch_name)
void Partition(WritableCatalog *new_nested_catalog)
void SetRevision(const uint64_t new_revision)
void MoveCatalogsToNested(const std::vector< std::string > &nested_catalogs, WritableCatalog *new_nested_catalog)
virtual ~WritableCatalog()
PathString GetParentPath(const PathString &path)
WritableCatalog * GetWritableParent() const
DeltaCounters delta_counters_
void VacuumDatabaseIfNecessary()
void RemoveEntry(const std::string &entry_path)
void UpdateEntry(const DirectoryEntry &entry, const std::string &path)
virtual bool IsWritable() const
void IncLinkcount(const std::string &path_within_group, const int delta)
void TouchEntry(const DirectoryEntryBase &entry, const XattrList &xattrs, const std::string &path)
int DecrementDirtyChildren()
int dirty_children() const
void UpdateEntry(const DirectoryEntry &entry, const shash::Md5 &path_hash)