Changeset 2702 for box/trunk/lib/backupstore/BackupStoreInfo.h
- Timestamp:
- 27/08/2010 10:18:57 (21 months ago)
- File:
-
- 1 edited
-
box/trunk/lib/backupstore/BackupStoreInfo.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/backupstore/BackupStoreInfo.h
r1868 r2702 47 47 48 48 // Save modified infomation back to store 49 void Save( );49 void Save(bool allowOverwrite = true); 50 50 51 51 // Data access functions … … 53 53 int64_t GetLastObjectIDUsed() const {return mLastObjectIDUsed;} 54 54 int64_t GetBlocksUsed() const {return mBlocksUsed;} 55 int64_t GetBlocksInCurrentFiles() const {return mBlocksInCurrentFiles;} 55 56 int64_t GetBlocksInOldFiles() const {return mBlocksInOldFiles;} 56 57 int64_t GetBlocksInDeletedFiles() const {return mBlocksInDeletedFiles;} … … 59 60 int64_t GetBlocksSoftLimit() const {return mBlocksSoftLimit;} 60 61 int64_t GetBlocksHardLimit() const {return mBlocksHardLimit;} 62 int64_t GetNumFiles() const {return mNumFiles;} 63 int64_t GetNumOldFiles() const {return mNumOldFiles;} 64 int64_t GetNumDeletedFiles() const {return mNumDeletedFiles;} 65 int64_t GetNumDirectories() const {return mNumDirectories;} 61 66 bool IsReadOnly() const {return mReadOnly;} 62 67 int GetDiscSetNumber() const {return mDiscSet;} 68 69 int ReportChangesTo(BackupStoreInfo& rOldInfo); 63 70 64 71 // Data modification functions 65 72 void ChangeBlocksUsed(int64_t Delta); 73 void ChangeBlocksInCurrentFiles(int64_t Delta); 66 74 void ChangeBlocksInOldFiles(int64_t Delta); 67 75 void ChangeBlocksInDeletedFiles(int64_t Delta); … … 71 79 void RemovedDeletedDirectory(int64_t DirID); 72 80 void ChangeLimits(int64_t BlockSoftLimit, int64_t BlockHardLimit); 81 void AdjustNumFiles(int64_t increase); 82 void AdjustNumOldFiles(int64_t increase); 83 void AdjustNumDeletedFiles(int64_t increase); 84 void AdjustNumDirectories(int64_t increase); 73 85 74 86 // Object IDs … … 79 91 void SetClientStoreMarker(int64_t ClientStoreMarker); 80 92 81 private: 82 static std::auto_ptr<BackupStoreInfo> CreateForRegeneration(int32_t AccountID, const std::string &rRootDir, 83 int DiscSet, int64_t LastObjectID, int64_t BlocksUsed, int64_t BlocksInOldFiles, 84 int64_t BlocksInDeletedFiles, int64_t BlocksInDirectories, int64_t BlockSoftLimit, int64_t BlockHardLimit); 93 const std::string& GetAccountName() { return mAccountName; } 94 void SetAccountName(const std::string& rName); 85 95 86 96 private: 97 static std::auto_ptr<BackupStoreInfo> CreateForRegeneration( 98 int32_t AccountID, const std::string &rAccountName, 99 const std::string &rRootDir, int DiscSet, 100 int64_t LastObjectID, int64_t BlocksUsed, 101 int64_t BlocksInCurrentFiles, int64_t BlocksInOldFiles, 102 int64_t BlocksInDeletedFiles, int64_t BlocksInDirectories, 103 int64_t BlockSoftLimit, int64_t BlockHardLimit); 104 87 105 // Location information 106 // Be VERY careful about changing types of these values, as 107 // they now define the sizes of fields on disk (via Archive). 88 108 int32_t mAccountID; 109 std::string mAccountName; 89 110 int mDiscSet; 90 111 std::string mFilename; … … 98 119 int64_t mLastObjectIDUsed; 99 120 int64_t mBlocksUsed; 121 int64_t mBlocksInCurrentFiles; 100 122 int64_t mBlocksInOldFiles; 101 123 int64_t mBlocksInDeletedFiles; … … 103 125 int64_t mBlocksSoftLimit; 104 126 int64_t mBlocksHardLimit; 127 int64_t mNumFiles; 128 int64_t mNumOldFiles; 129 int64_t mNumDeletedFiles; 130 int64_t mNumDirectories; 105 131 std::vector<int64_t> mDeletedDirectories; 106 132 }; 107 108 133 109 134 #endif // BACKUPSTOREINFO__H
Note: See TracChangeset
for help on using the changeset viewer.
