Example #1
0
 /// <summary>
 /// Add a cache listener that receives events based on a filter
 /// evaluation.
 /// </summary>
 /// <remarks>
 /// <p>
 /// The listeners will receive <see cref="CacheEventArgs"/> objects,
 /// but if <paramref name="isLite"/> is passed as <b>true</b>, they
 /// <i>might</i> not contain the <b>OldValue</b> and <b>NewValue</b>
 /// properties.</p>
 /// <p>
 /// To unregister the <see cref="ICacheListener"/>, use the
 /// <see cref="RemoveCacheListener(ICacheListener, IFilter)"/>
 /// method.</p>
 /// </remarks>
 /// <param name="listener">
 /// The <see cref="ICacheListener"/> to add.</param>
 /// <param name="filter">
 /// A filter that will be passed <b>CacheEvent</b> objects to
 /// select from; a <b>CacheEvent</b> will be delivered to the
 /// listener only if the filter evaluates to <b>true</b> for that
 /// <b>CacheEvent</b>; <c>null</c> is equivalent to a filter
 /// that alway returns <b>true</b>.
 /// </param>
 /// <param name="isLite">
 /// <b>true</b> to indicate that the <see cref="CacheEventArgs"/>
 /// objects do not have to include the <b>OldValue</b> and
 /// <b>NewValue</b> property values in order to allow optimizations.
 /// </param>
 public virtual void AddCacheListener(ICacheListener listener, IFilter filter, bool isLite)
 {
     NamedCache.AddCacheListener(listener, filter, isLite);
 }
Example #2
0
 /// <summary>
 /// Add a cache listener for a specific key.
 /// </summary>
 /// <remarks>
 /// <p>
 /// The listeners will receive <see cref="CacheEventArgs"/> objects,
 /// but if <paramref name="isLite"/> is passed as <b>true</b>, they
 /// <i>might</i> not contain the
 /// <see cref="CacheEventArgs.OldValue"/> and
 /// <see cref="CacheEventArgs.NewValue"/> properties.</p>
 /// <p>
 /// To unregister the ICacheListener, use the
 /// <see cref="RemoveCacheListener(ICacheListener, object)"/>
 /// method.</p>
 /// </remarks>
 /// <param name="listener">
 /// The <see cref="ICacheListener"/> to add.
 /// </param>
 /// <param name="key">
 /// The key that identifies the entry for which to raise events.
 /// </param>
 /// <param name="isLite">
 /// <b>true</b> to indicate that the <see cref="CacheEventArgs"/>
 /// objects do not have to include the <b>OldValue</b> and
 /// <b>NewValue</b> property values in order to allow optimizations.
 /// </param>
 public virtual void AddCacheListener(ICacheListener listener, object key, bool isLite)
 {
     NamedCache.AddCacheListener(listener, key, isLite);
 }