CacheEntryChangeMonitor 类

定义

提供表示 ChangeMonitor 类型的基类,可通过实现此类型来监视对缓存项的更改。Provides a base class that represents a ChangeMonitor type that can be implemented in order to monitor changes to cache entries.

public ref class CacheEntryChangeMonitor abstract : System::Runtime::Caching::ChangeMonitor
public abstract class CacheEntryChangeMonitor : System.Runtime.Caching.ChangeMonitor
type CacheEntryChangeMonitor = class
    inherit ChangeMonitor
Public MustInherit Class CacheEntryChangeMonitor
Inherits ChangeMonitor
继承
CacheEntryChangeMonitor

注解

CacheEntryChangeMonitor类提供可实现的抽象属性, 这些属性可用于监视缓存条目。The CacheEntryChangeMonitor class provides abstract, read-only properties that can be implemented for monitoring cache entries. 当缓存实现必须监视其自己的缓存中的项更改时, 将使用此类。This class is used when a cache implementation has to monitor changes to entries in its own cache. 对于作为ObjectCache缓存实现的缓存, CreateCacheEntryChangeMonitor(IEnumerable<String>, String)方法返回CacheEntryChangeMonitor类型的实例。For caches that are ObjectCache cache implementations, an instance of the CacheEntryChangeMonitor type is returned by the CreateCacheEntryChangeMonitor(IEnumerable<String>, String) method.

继承者说明

有关必须遵循的继承约定的信息, 请参阅ChangeMonitor类概述中的继承者的信息。For information about the inheritance contract that must be followed, see the information for inheritors in the ChangeMonitor class overview.

构造函数

CacheEntryChangeMonitor()

初始化 CacheEntryChangeMonitor 类的新实例。Initializes a new instance of the CacheEntryChangeMonitor class. 从派生类中的构造函数调用此构造函数以初始化基类。This constructor is called from constructors in derived classes to initialize the base class.

属性

CacheKeys

获取要监视其是否发生更改的缓存键集合。Gets a collection of cache keys that are monitored for changes.

HasChanged

获取一个值,该值指示由 ChangeMonitor 类监视的状态已发生更改。Gets a value that indicates that the state that is monitored by the ChangeMonitor class has changed.

(继承自 ChangeMonitor)
IsDisposed

获取一个值,该值指示释放 ChangeMonitor 类的派生实例。Gets a value that indicates that the derived instance of a ChangeMonitor class is disposed.

(继承自 ChangeMonitor)
LastModified

获取一个值,该值指示所监视缓存项的最近更改时间(用 UTC 时间表示)。Gets a value that indicates the latest time (in UTC time) that the monitored cache entry was changed.

RegionName

获取缓存中的某个区域的名称。Gets the name of a region of the cache.

UniqueId

获取一个表示 ChangeMonitor 类实例的值。Gets a value that represents the ChangeMonitor class instance.

(继承自 ChangeMonitor)

方法

Dispose()

释放由 ChangeMonitor 类的当前实例占用的所有资源。Releases all resources that are used by the current instance of the ChangeMonitor class.

(继承自 ChangeMonitor)
Dispose(Boolean)

释放所有托管资源和非托管资源,以及对 ChangeMonitor 实例的任何引用。Releases all managed and unmanaged resources and any references to the ChangeMonitor instance. 此重载必须由派生的更改监视器类实现。This overload must be implemented by derived change-monitor classes.

(继承自 ChangeMonitor)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitializationComplete()

从派生类的构造函数进行调用以指示初始化已完成。Called from the constructor of derived classes to indicate that initialization is finished.

(继承自 ChangeMonitor)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
NotifyOnChanged(OnChangedCallback)

由缓存实施者调用来注册回调,并在某个依赖项已更改时通过 ObjectCache 委托通知 OnChangedCallback 实例。Called by Cache implementers to register a callback and notify an ObjectCache instance through the OnChangedCallback delegate when a dependency has changed.

(继承自 ChangeMonitor)
OnChanged(Object)

由派生类调用以在某个依赖项发生更改时引发事件。Called by derived classes to raise the event when a dependency changes.

(继承自 ChangeMonitor)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于