Ignore:
Timestamp:
28/06/2009 20:29:10 (3 years ago)
Author:
chris
Message:

Make housekeeping check the object reference counts and fix them if
they're wrong.

Add a callback interface to decouple housekeeping from the
BackupStoreDaemon?, allowing it to be called directly in tests.

Allow housekeeping callers to request it to keep trying forever to get a
lock on the account if it's busy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbstored/HousekeepStoreAccount.h

    r2176 r2541  
    1818class BackupStoreDirectory; 
    1919 
     20class HousekeepingCallback 
     21{ 
     22        public: 
     23        virtual ~HousekeepingCallback() {} 
     24        virtual bool CheckForInterProcessMsg(int AccountNum = 0, int MaximumWaitTime = 0) = 0; 
     25}; 
    2026 
    2127// -------------------------------------------------------------------------- 
     
    3036{ 
    3137public: 
    32         HousekeepStoreAccount(int AccountID, const std::string &rStoreRoot, int StoreDiscSet, BackupStoreDaemon &rDaemon); 
     38        HousekeepStoreAccount(int AccountID, const std::string &rStoreRoot, 
     39                int StoreDiscSet, HousekeepingCallback* pHousekeepingCallback); 
    3340        ~HousekeepStoreAccount(); 
    3441         
    35         void DoHousekeeping(); 
     42        void DoHousekeeping(bool KeepTryingForever = false); 
    3643         
    3744         
     
    6673        std::string mStoreRoot; 
    6774        int mStoreDiscSet; 
    68         BackupStoreDaemon &mrDaemon; 
     75        HousekeepingCallback* mpHousekeepingCallback; 
    6976         
    7077        int64_t mDeletionSizeTarget; 
     
    9299        int64_t mFilesDeleted; 
    93100        int64_t mEmptyDirectoriesDeleted; 
     101 
     102        // New reference count list 
     103        std::vector<uint32_t> mNewRefCounts; 
     104        bool mSuppressRefCountChangeWarnings; 
    94105         
    95106        // Poll frequency 
Note: See TracChangeset for help on using the changeset viewer.