Table of Contents

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 IStateStore

The 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 string

The tenant identifier.

clusterName string

The cluster name.

clusterVersion string

The cluster version.

tenantInfo NeosTenantInfo

The tenant informations.

Returns

Task

A Task that will complete when the operation has completed.

RemoveAsync(string)

Removes a tenant.

public Task RemoveAsync(string identifier)

Parameters

identifier string

The tenant identifier.

Returns

Task

A Task that will complete when the operation has completed.

RemoveAsync(string, string, string)

Removes a tenant for the specified cluster.

public Task RemoveAsync(string identifier, string clusterName, string clusterVersion)

Parameters

identifier string

The tenant identifier.

clusterName string

The cluster name.

clusterVersion string

The cluster version.

Returns

Task

A Task that will complete when the operation has completed.

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 string

The tenant identifier.

clusterName string

The cluster name.

clusterVersion string

The cluster version.

Returns

Task<(NeosTenantInfo NeosTenantInfo, string Etag)>

The tenant informations or null if the key is not cached.