|
10Duke Scale C++ Client
|
#include <DefaultLeases.h>
Extension of tenduke::se::licensing::SimpleLeases, which adds operation to purge expired leases.
Public Member Functions | |
| DefaultLeases (const std::shared_ptr<::tenduke::time::Clock > &clock) | |
| Constructs new instance. | |
| virtual void | purgeExpiredLeases () |
| Purges expired leases. | |
Public Member Functions inherited from tenduke::se::licensing::SimpleLeases | |
| std::vector<::tenduke::se::licensing::Lease > | getAllLeases () override |
| Returns all leases in the cache. | |
| ::tenduke::se::licensing::Lease | getLease (const std::string &leaseId) override |
| Returns a lease by id. | |
| std::vector<::tenduke::se::licensing::Lease > | getLeasesForProduct (const std::string &productName) override |
| Returns all leases for given product. | |
| bool | isEmpty () override |
Returns true if the cache is empty. | |
| std::size_t | size () override |
| Returns how many leases the cache contains. | |
| void | addLease (const ::tenduke::se::licensing::Lease &lease) override |
| Adds a lease to the cache. | |
| void | mergeLeases (const std::vector<::tenduke::se::licensing::Lease > &leases) override |
| Merges given leases to the cache. | |
| void | removeAll () override |
| Removes all leases from the cache. | |
| void | removeLease (const ::tenduke::se::licensing::Lease &lease) override |
| Removes given lease from the cache. | |
| void | removeLease (const std::string &leaseId) override |
| Removes lease from the cache by lease id. | |
Additional Inherited Members | |
Protected Attributes inherited from tenduke::se::licensing::SimpleLeases | |
| std::map< std::string, ::tenduke::se::licensing::Lease > | leases |
| The leases. | |
| std::recursive_mutex | concurrencyLock |
| Serializes the access to the methods. | |
|
explicit |
Constructs new instance.
| clock | - |