Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
ConverterCollections..::.ConverterNamedCache..::.AddCacheListener Method (ICacheListener, Object, Boolean)
ConverterCollections..::.ConverterNamedCache Class See Also Send Feedback

Oracle® Coherence .NET API Reference Release 3.6
E15727-01
Add a cache listener for a specific key.

Namespace: Tangosol.Util
Assembly: Coherence (in Coherence.dll) Version: 3.6.0.0 (3.6.0.0)

# Syntax

C#
    public virtual void AddCacheListener(
    	ICacheListener listener,
    	Object key,
    	bool isLite
    )

#### Parameters

listener
  Type: Tangosol.Net.Cache..::.ICacheListener
  The ICacheListener to add.

key
  Type: System..::.Object
  The key that identifies the entry for which to raise events.

isLite
  Type: System..::.Boolean
  true to indicate that the CacheEventArgs objects do not have to include the OldValue and NewValue property values in order to allow optimizations.

#### Implements

IObservableCache..::.AddCacheListener(ICacheListener, Object, Boolean)

# Remarks

The listeners will receive CacheEventArgs objects, but if isLite is passed as true, they might not contain the OldValue and NewValue properties.

To unregister the ICacheListener, use the RemoveCacheListener(ICacheListener, Object) method.

# See Also

ConverterCollections..::.ConverterNamedCache Class
AddCacheListener Overload
Tangosol.Util Namespace