IConcurrentPolicyRegistry<TKey>
public interface IConcurrentPolicyRegistry<TKey> : IPolicyRegistry<TKey>, IReadOnlyPolicyRegistry<TKey>, IEnumerable<KeyValuePair<TKey, IsPolicy>>, IEnumerable
Represents a collection of policies keyed by TKey which can be updated and consumed in a thread-safe manner.
TPolicy AddOrUpdate<TPolicy>(TKey key, Func<TKey, TPolicy> addPolicyFactory, Func<TKey, TPolicy, TPolicy> updatePolicyFactory) where TPolicy : IsPolicy
Adds a key/policy pair to the registry if the key does not already
exist, or updates a key/policy pair in the registry if the key
already exists.
TPolicy AddOrUpdate<TPolicy>(TKey key, TPolicy addPolicy, Func<TKey, TPolicy, TPolicy> updatePolicyFactory) where TPolicy : IsPolicy
Adds a key/policy pair to the registry if the key does not already
exist, or updates a key/policy pair in the registry if the key
already exists.
Adds a policy with the provided key and policy to the registry
if the key does not already exist.
Adds a key/policy pair to the registry
if the key does not already exist.
Adds an element with the provided key and policy to the registry.
Removes the policy stored under the specified key from the registry.
bool TryUpdate<TPolicy>(TKey key, TPolicy newPolicy, TPolicy comparisonPolicy) where TPolicy : IsPolicy
Compares the existing policy for the specified key with a specified policy, and if they are equal, updates the policy with a third value.