10Duke Scale C++ Client
All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
tenduke::se::licensing::Leases Class Referenceabstract

#include <Leases.h>

Detailed Description

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.

Inheritance diagram for tenduke::se::licensing::Leases:
tenduke::se::licensing::MutableLeases tenduke::se::licensing::SimpleLeases tenduke::se::licensing::DefaultLeases

Public Member Functions

virtual std::vector<::tenduke::se::licensing::LeasegetAllLeases ()=0
 Returns all leases in the cache.
 
virtual std::vector<::tenduke::se::licensing::LeasegetLeasesForProduct (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.
 

Member Function Documentation

◆ getAllLeases()

virtual std::vector<::tenduke::se::licensing::Lease > tenduke::se::licensing::Leases::getAllLeases ( )
pure virtual

Returns all leases in the cache.

Returns
-

Implemented in tenduke::se::licensing::SimpleLeases.

◆ getLease()

virtual::tenduke::se::licensing::Lease tenduke::se::licensing::Leases::getLease ( const std::string & leaseId)
pure virtual

Returns a lease by id.

Parameters
leaseId
Returns
-
Exceptions
std::out_of_rangeIf no such lease in the cache

Implemented in tenduke::se::licensing::SimpleLeases.

◆ getLeasesForProduct()

virtual std::vector<::tenduke::se::licensing::Lease > tenduke::se::licensing::Leases::getLeasesForProduct ( const std::string & productName)
pure virtual

Returns all leases for given product.

Parameters
productName-
Returns
-

Implemented in tenduke::se::licensing::SimpleLeases.


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