60 const std::string &description) = 0;
62 const std::string &description) = 0;
64 const std::string &description,
const bool is_catalog) = 0;
68 virtual bool Cleanup(
const uint64_t leave_size) = 0;
70 virtual std::vector<std::string>
List() = 0;
71 virtual std::vector<std::string>
ListPinned() = 0;
78 virtual bool SetLimit(uint64_t limit) = 0;
81 virtual void Spawn() = 0;
82 virtual pid_t
GetPid() = 0;
86 const std::string &channel_id) = 0;
88 const std::string &channel_id) = 0;
123 const std::string &description) { }
125 const std::string &description) { }
127 const std::string &description,
const bool is_catalog)
134 virtual bool Cleanup(
const uint64_t leave_size) {
return false; }
137 const std::string &channel_id) { }
139 const std::string &channel_id) { }
141 virtual std::vector<std::string>
List() {
return std::vector<std::string>(); }
143 return std::vector<std::string>();
146 return std::vector<std::string>();
149 return std::vector<std::string>();
159 virtual pid_t
GetPid() {
return getpid(); }
163 #endif // CVMFS_QUOTA_H_
virtual bool HasCapability(Capabilities capability)
virtual bool SetLimit(uint64_t limit)=0
pthread_mutex_t * lock_back_channels_
virtual bool SetLimit(uint64_t)
virtual uint64_t GetCleanupRate(uint64_t period_s)=0
void BroadcastBackchannels(const std::string &message)
virtual std::vector< std::string > List()=0
virtual void Unpin(const shash::Any &hash)=0
virtual bool Cleanup(const uint64_t leave_size)=0
virtual std::vector< std::string > ListVolatile()=0
static const uint32_t kProtocolRevision
virtual uint64_t GetMaxFileSize()
virtual std::vector< std::string > ListPinned()=0
virtual std::vector< std::string > ListCatalogs()
assert((mem||(size==0))&&"Out Of Memory")
virtual uint64_t GetCleanupRate(uint64_t period_s)
virtual std::vector< std::string > ListCatalogs()=0
virtual uint64_t GetSize()=0
virtual std::vector< std::string > List()
virtual void InsertVolatile(const shash::Any &hash, const uint64_t size, const std::string &description)
virtual uint64_t GetCapacity()=0
virtual void InsertVolatile(const shash::Any &hash, const uint64_t size, const std::string &description)=0
virtual uint64_t GetSizePinned()
virtual uint64_t GetSize()
virtual ~NoopQuotaManager()
virtual void Insert(const shash::Any &hash, const uint64_t size, const std::string &description)=0
virtual void Touch(const shash::Any &hash)=0
virtual bool Pin(const shash::Any &hash, const uint64_t size, const std::string &description, const bool is_catalog)=0
virtual bool Cleanup(const uint64_t leave_size)
virtual uint64_t GetSizePinned()=0
uint32_t protocol_revision_
virtual void RegisterBackChannel(int back_channel[2], const std::string &channel_id)=0
std::map< shash::Md5, int > back_channels_
virtual uint64_t GetCapacity()
virtual std::vector< std::string > ListVolatile()
virtual bool Pin(const shash::Any &hash, const uint64_t size, const std::string &description, const bool is_catalog)
virtual uint32_t GetProtocolRevision()
virtual void UnregisterBackChannel(int back_channel[2], const std::string &channel_id)
virtual void UnregisterBackChannel(int back_channel[2], const std::string &channel_id)=0
virtual void Touch(const shash::Any &hash)
virtual void Insert(const shash::Any &hash, const uint64_t size, const std::string &description)
virtual void Remove(const shash::Any &file)
virtual void RegisterBackChannel(int back_channel[2], const std::string &channel_id)
virtual uint64_t GetMaxFileSize()=0
virtual void Unpin(const shash::Any &hash)
virtual void Remove(const shash::Any &file)=0
virtual uint32_t GetProtocolRevision()=0
void UnlockBackChannels()
virtual bool HasCapability(Capabilities capability)=0
virtual std::vector< std::string > ListPinned()