|
10Duke Scale C++ Client
|
#include <Leases.h>
A read-only lease-cache service.
This is a memory-based cache for leases of checked out licenses. The licensing client stores all leases to a cache, which removes the need for the application developer to do bookkeeping for checked out leases.
This read-only interface allows the application developer to check then contents of the cache.
To operate on the leases (release or heartbeat), use the licensing client.
Note that the lease-cache is a local understanding of what is currently checked out. For example, a leases released by a system administrator from another machine would not be synced to the lease cache.
Public Member Functions | |
| virtual std::vector<::tenduke::se::licensing::Lease > | getAllLeases ()=0 |
| Returns all leases in the cache. | |
| virtual std::vector<::tenduke::se::licensing::Lease > | getLeasesForProduct (const std::string &productName)=0 |
| Returns all leases for given product. | |
| virtual::tenduke::se::licensing::Lease | getLease (const std::string &leaseId)=0 |
| Returns a lease by id. | |
| virtual bool | isEmpty ()=0 |
Returns true if the cache is empty. | |
| virtual std::size_t | size ()=0 |
| Returns how many leases the cache contains. | |
|
pure virtual |
Returns all leases in the cache.
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.
|
pure virtual |
Returns a lease by id.
| leaseId |
| std::out_of_range | If no such lease in the cache |
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.
|
pure virtual |
Returns all leases for given product.
| productName | - |
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.
|
pure virtual |
Returns true if the cache is empty.
true if the cache is empty or false if the cache contains leases. Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.
|
pure virtual |
Returns how many leases the cache contains.
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.