Class DistributedTenantsCache
- Namespace
- GroupeIsa.Neos.ClusterCommunication.Multitenant
- Assembly
- GroupeIsa.Neos.ClusterCommunication.dll
Represents a cache of tenants.
public class DistributedTenantsCache : ITenantsCache
- Inheritance
-
DistributedTenantsCache
- Implements
- Inherited Members
Constructors
DistributedTenantsCache(IStateStore)
Initializes a new instance of the DistributedTenantsCache class.
public DistributedTenantsCache(IStateStore stateStore)
Parameters
stateStore
IStateStoreThe state store.
Methods
AddOrUpdateAsync(string, string, string, NeosTenantInfo?)
Adds or update the tenant informations for the specified tenant id and the cluster name.
public Task AddOrUpdateAsync(string identifier, string clusterName, string clusterVersion, NeosTenantInfo? tenantInfo)
Parameters
identifier
stringThe tenant identifier.
clusterName
stringThe cluster name.
clusterVersion
stringThe cluster version.
tenantInfo
NeosTenantInfoThe tenant informations.
Returns
RemoveAsync(string)
Removes a tenant.
public Task RemoveAsync(string identifier)
Parameters
identifier
stringThe tenant identifier.
Returns
RemoveAsync(string, string, string)
Removes a tenant for the specified cluster.
public Task RemoveAsync(string identifier, string clusterName, string clusterVersion)
Parameters
identifier
stringThe tenant identifier.
clusterName
stringThe cluster name.
clusterVersion
stringThe cluster version.
Returns
TryGetAsync(string, string, string)
Tries to get the tenant informations for the specified tenant id and the cluster name.
public Task<(NeosTenantInfo? NeosTenantInfo, string Etag)> TryGetAsync(string identifier, string clusterName, string clusterVersion)
Parameters
identifier
stringThe tenant identifier.
clusterName
stringThe cluster name.
clusterVersion
stringThe cluster version.
Returns
- Task<(NeosTenantInfo NeosTenantInfo, string Etag)>
The tenant informations or
null
if the key is not cached.