10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::se::licensing::DefaultLeases Class Reference

#include <DefaultLeases.h>

Detailed Description

Extension of tenduke::se::licensing::SimpleLeases, which adds operation to purge expired leases.

Inheritance diagram for tenduke::se::licensing::DefaultLeases:
tenduke::se::licensing::SimpleLeases tenduke::se::licensing::MutableLeases tenduke::se::licensing::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::LeasegetAllLeases () 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::LeasegetLeasesForProduct (const std::string &productName) override
 Returns all leases for given product.
 
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::Leaseleases
 The leases.
 
std::recursive_mutex concurrencyLock
 Serializes the access to the methods.
 

Constructor & Destructor Documentation

◆ DefaultLeases()

tenduke::se::licensing::DefaultLeases::DefaultLeases ( const std::shared_ptr<::tenduke::time::Clock > &  clock)
explicit

Constructs new instance.

Parameters
clock-

The documentation for this class was generated from the following files: