|
10Duke Scale C++ Client
|
#include <MutableLeases.h>
Service, which extends the readonly cache tenduke::se::licensing::Leases with maintenance operations.
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::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 |
Adds a lease to the cache.
| lease | - |
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.
|
pure virtual |
Merges given leases to the cache.
The merge honors tenduke::se::licensing::Lease.oldLeaseId, if present.
| leases |
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.
|
pure virtual |
Removes all leases from the cache.
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.
|
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.
| lease | - |
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.
|
pure virtual |
Removes lease from the cache by lease id.
| leaseId | - |
Implemented in SimpleLeases, and tenduke::se::licensing::SimpleLeases.