10Duke Scale SDK for Java
Loading...
Searching...
No Matches
tenduke.scale.api.InMemoryTokenStore Class Reference

Detailed Description

Data class that stores tokens thread safely in memory for 10Duke Scale SDK for Java.

Thread safety provided by java.util.concurrent.ConcurrentLinkedQueue.

Inheritance diagram for tenduke.scale.api.InMemoryTokenStore:
tenduke.scale.api.TokenStore

Public Member Functions

List< TokenStoreLicenseCheckoutResultall ()
 Retrieves all currently held TokenStoreLicenseCheckoutResult objects.
 
List< TokenStoreLicenseCheckoutResultlistByProductName (final String productName)
 Retrieves all TokenStoreLicenseCheckoutResult objects associated to given product name.
 
TokenStoreLicenseCheckoutResult findByLeaseId (final String leaseId)
 Retrieves a TokenStoreLicenseCheckoutResult by its lease id.
 
void save (final TokenStoreLicenseCheckoutResult checkoutResult)
 Stores a given TokenStoreLicenseCheckoutResult.
 
void removeSafelyByLeaseId (final String leaseId)
 Removes a token by its lease id.
 
- Public Member Functions inherited from tenduke.scale.api.TokenStore

Member Function Documentation

◆ all()

List< TokenStoreLicenseCheckoutResult > tenduke.scale.api.InMemoryTokenStore.all ( )

Retrieves all currently held TokenStoreLicenseCheckoutResult objects.

Returns
all tokens.

Implements tenduke.scale.api.TokenStore.

◆ findByLeaseId()

TokenStoreLicenseCheckoutResult tenduke.scale.api.InMemoryTokenStore.findByLeaseId ( final String leaseId)

Retrieves a TokenStoreLicenseCheckoutResult by its lease id.

Parameters
leaseIdfor filtering by lease id.
Returns
The token matching the lease id or null.

Implements tenduke.scale.api.TokenStore.

◆ listByProductName()

List< TokenStoreLicenseCheckoutResult > tenduke.scale.api.InMemoryTokenStore.listByProductName ( final String productName)

Retrieves all TokenStoreLicenseCheckoutResult objects associated to given product name.

Parameters
productNamefor filtering by product name.
Returns
all tokens filtered by product name.

Implements tenduke.scale.api.TokenStore.

◆ removeSafelyByLeaseId()

void tenduke.scale.api.InMemoryTokenStore.removeSafelyByLeaseId ( final String leaseId)

Removes a token by its lease id.

Does not throw errors if the leaseId is not found.

Parameters
leaseIdused to identify the token.

Implements tenduke.scale.api.TokenStore.

◆ save()

void tenduke.scale.api.InMemoryTokenStore.save ( final TokenStoreLicenseCheckoutResult checkoutResult)

Stores a given TokenStoreLicenseCheckoutResult.

Parameters
checkoutResultObject that contains the information used to checkout a license and the resulting license token to store.

Implements tenduke.scale.api.TokenStore.


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