Search Results for

    Show / Hide Table of Contents

    Class CacheEventHub

    Summary description for CacheEventHub.

    Inheritance
    System.Object
    CacheEventHub
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: ImageVault.Core.DataAccess.Repositories
    Assembly: ImageVault.Core.dll
    Syntax
    public class CacheEventHub

    Properties

    Instance

    Returns the singleton instance of the CacheEventHub class.

    Declaration
    public static CacheEventHub Instance { get; }
    Property Value
    Type Description
    CacheEventHub

    Methods

    Notify(Object, CacheEventType, Object)

    Notifies all listeners of the supplied change. Used for internal changes. Will notify all internal listeners and all load balancing listeners.

    Declaration
    public void Notify(object sender, CacheEventType eventType, object arg)
    Parameters
    Type Name Description
    System.Object sender

    The sender of the change event

    CacheEventType eventType

    The CacheEventType of the change

    System.Object arg

    The object containing the information about the change

    NotifyFromLoadBalancingService(CacheEventType, Object)

    Notifies the listeners that are interested of changes from the LoadBalancing service. This is only called by the Load balancing services.

    Declaration
    [Obsolete("Loadbalancing triggering is removed. Use the Notify method instead.")]
    public void NotifyFromLoadBalancingService(CacheEventType eventType, object arg)
    Parameters
    Type Name Description
    CacheEventType eventType
    System.Object arg

    OnTrigger(Object, CacheEventArgs)

    Notifies the listeners of the Trigger event

    Declaration
    protected virtual void OnTrigger(object sender, CacheEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The sender of the event. In case of a load balancing event, the sender is the same as the Instance

    CacheEventArgs e

    The argument to send to the listeners

    OnTrigger(Object, CacheEventArgs, Boolean)

    Notifies the listeners of the Trigger event

    Declaration
    [Obsolete("Use OnTrigger without notifyLoadBalancingService instead")]
    protected virtual void OnTrigger(object sender, CacheEventArgs e, bool notifyLoadBalancingService)
    Parameters
    Type Name Description
    System.Object sender

    The sender of the event. In case of a load balancing event, the sender is the same as the Instance

    CacheEventArgs e

    The argument to send to the listeners

    System.Boolean notifyLoadBalancingService

    Flag, determining whether the LoadBalancing service should be notified

    Events

    Trigger

    This event is fired when the cache eventhub is triggered

    Declaration
    public event EventHandler<CacheEventArgs> Trigger
    Event Type
    Type Description
    System.EventHandler<CacheEventArgs>
    Remarks

    In cases when the event is triggered from another core, the sender is the same as Instance

    TriggerLoadBalancing

    This event notifies the LoadbalancingService that the cache eventhub is triggered

    Declaration
    [Obsolete("Loadbalancing triggering is removed. Either use the Trigger event to be notified locally or use the IObjectCache instead.")]
    public event EventHandler<CacheEventArgs> TriggerLoadBalancing
    Event Type
    Type Description
    System.EventHandler<CacheEventArgs>
    In This Article
    Back to top (c) Meriworks 2002-2022