/// <summary> /// Notifies other cache clients about a changed cache key. /// </summary> /// <param name="key">The key.</param> /// <param name="action">The cache action.</param> public override void NotifyChange(string key, CacheItemChangedEventAction action) { PublishMessage(BackplaneMessage.ForChanged(_identifier, key, action)); }
/// <summary> /// Initializes a new instance of the <see cref="CacheItemChangedEventArgs" /> class. /// </summary> /// <param name="key">The key.</param> /// <param name="region">The region.</param> /// <param name="action">The cache action.</param> public CacheItemChangedEventArgs(string key, string region, CacheItemChangedEventAction action) : base(key, region) { Action = action; }
/// <summary> /// Notifies other cache clients about a changed cache key. /// </summary> /// <param name="key">The key.</param> /// <param name="region">The region.</param> /// <param name="action">The cache action.</param> public override void NotifyChange(string key, string region, CacheItemChangedEventAction action) { this.PublishMessage(BackplaneMessage.ForChanged(this.identifier, key, region, action)); }
/// <summary> /// Notifies other cache clients about a changed cache key. /// </summary> /// <param name="key">The key.</param> /// <param name="region">The region.</param> /// <param name="action">The action.</param> public abstract void NotifyChange(string key, string region, CacheItemChangedEventAction action);
/// <summary> /// Sends a changed message for the given <paramref name="key"/> in <paramref name="region"/>. /// </summary> /// <param name="key">The key.</param> /// <param name="region">The region.</param> /// <param name="action">The action.</param> protected internal void TriggerChanged(string key, string region, CacheItemChangedEventAction action) { Changed?.Invoke(this, new CacheItemChangedEventArgs(key, region, action)); }
/// <summary> /// Notifies other cache clients about a changed cache key. /// </summary> /// <param name="key">The key.</param> /// <param name="region">The region.</param> /// <param name="action">The action.</param> public abstract Task NotifyChangeAsync(string key, string region, CacheItemChangedEventAction action);
/// <summary> /// Sends a changed message for the given <paramref name="key"/>. /// </summary> /// <param name="key">The key.</param> /// <param name="action">The action.</param> protected internal void TriggerChangedAsync(string key, CacheItemChangedEventAction action) { ChangedAsync?.Invoke(this, new CacheItemChangedEventArgs(key, action)); }
/// <summary> /// Sends a changed message for the given <paramref name="key"/>. /// </summary> /// <param name="key">The key.</param> /// <param name="action">The action.</param> protected internal void TriggerChanged(TKey key, CacheItemChangedEventAction action) { Changed?.Invoke(this, new CacheItemChangedEventArgs <TKey>(key, action)); }
/// <summary> /// Initializes a new instance of the <see cref="CacheItemChangedEventArgs{TKey}" /> class. /// </summary> /// <param name="key">The key.</param> /// <param name="action">The cache action.</param> public CacheItemChangedEventArgs(TKey key, CacheItemChangedEventAction action) : base(key) { Action = action; }
//private BackplaneMessage(byte[] owner, BackplaneAction action, string key, string region) // : this(owner, action, key) //{ // NotNullOrWhiteSpace(region, nameof(region)); // Region = region; //} private BackplaneMessage(byte[] owner, BackplaneAction action, string key, CacheItemChangedEventAction changeAction) : this(owner, action, key) { ChangeAction = changeAction; }
/// <summary> /// Notifies other cache clients about a changed cache key. /// </summary> /// <param name="key">The key.</param> /// <param name="action">The action.</param> public abstract void NotifyChange(TKey key, CacheItemChangedEventAction action);
/// <summary> /// Initializes a new instance of the <see cref="CacheItemChangedEventArgs" /> class. /// </summary> /// <param name="key">The key.</param> /// <param name="action">The cache action.</param> public CacheItemChangedEventArgs(string key, CacheItemChangedEventAction action) : base(key) { this.Action = action; }
/// <summary> /// Creates a new <see cref="BackplaneMessage"/> for the changed action. /// </summary> /// <param name="owner">The owner.</param> /// <param name="key">The key.</param> /// <param name="region">The region.</param> /// <param name="changeAction">The cache change action.</param> /// <returns>The new <see cref="BackplaneMessage"/> instance.</returns> public static BackplaneMessage ForChanged(string owner, string key, string region, CacheItemChangedEventAction changeAction) => new BackplaneMessage(owner, Changed, key, region, changeAction);
private BackplaneMessage(string owner, BackplaneAction action, string key, string region, CacheItemChangedEventAction changeAction) : this(owner, action, key, region) { this.ChangeAction = changeAction; }
/// <summary> /// Notifies other cache clients about a changed cache key. /// </summary> /// <param name="key">The key.</param> /// <param name="region">The region.</param> /// <param name="action">The cache action.</param> public override Task NotifyChangeAsync(string key, string region, CacheItemChangedEventAction action) { return(PublishMessageAsync(BackplaneMessage.ForChanged(_identifier, key, region, action))); }
/// <summary> /// Creates a new <see cref="BackplaneMessage"/> for the changed action. /// </summary> /// <param name="owner">The owner.</param> /// <param name="key">The key.</param> /// <param name="changeAction">The cache change action.</param> /// <returns>The new <see cref="BackplaneMessage"/> instance.</returns> public static BackplaneMessage ForChanged(byte[] owner, string key, CacheItemChangedEventAction changeAction) => new BackplaneMessage(owner, Changed, key, changeAction);