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

#include <MutableLeases.h>

Detailed Description

Service, which extends the readonly cache tenduke::se::licensing::Leases with maintenance operations.

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

Public Member Functions

virtual void addLease (const ::tenduke::se::licensing::Lease &lease)=0
 Adds a lease to the cache.
 
virtual void removeAll ()=0
 Removes all leases from the cache.
 
virtual void removeLease (const ::tenduke::se::licensing::Lease &lease)=0
 Removes given lease from the cache.
 
virtual void removeLease (const std::string &leaseId)=0
 Removes lease from the cache by lease id.
 
virtual void mergeLeases (const std::vector<::tenduke::se::licensing::Lease > &leases)=0
 Merges given leases to the cache.
 
- Public Member Functions inherited from tenduke::se::licensing::Leases
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

◆ addLease()

virtual void tenduke::se::licensing::MutableLeases::addLease ( const ::tenduke::se::licensing::Lease lease)
pure virtual

Adds a lease to the cache.

Parameters
lease-

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

◆ mergeLeases()

virtual void tenduke::se::licensing::MutableLeases::mergeLeases ( const std::vector<::tenduke::se::licensing::Lease > &  leases)
pure virtual

Merges given leases to the cache.

The merge honors tenduke::se::licensing::Lease.oldLeaseId, if present.

Parameters
leases

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

◆ removeAll()

virtual void tenduke::se::licensing::MutableLeases::removeAll ( )
pure virtual

Removes all leases from the cache.

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

◆ removeLease() [1/2]

virtual void tenduke::se::licensing::MutableLeases::removeLease ( const ::tenduke::se::licensing::Lease lease)
pure virtual

Removes given lease from the cache.

IMPORTANT: Uses tenduke::se::licensing::Lease.oldLeaseId if present falling back to tenduke::se::licensing::Lease.leaseId. This is to work transparently with heartbeats.

Parameters
lease-

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

◆ removeLease() [2/2]

virtual void tenduke::se::licensing::MutableLeases::removeLease ( const std::string &  leaseId)
pure virtual

Removes lease from the cache by lease id.

Parameters
leaseId-

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


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