Oracle® Coherence .NET API Reference Release 3.7.1
E22844-03

ICacheTrigger represents a functional agent that allows to validate, reject or modify mutating operations against an underlying cache.

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

Syntax

C#
public interface ICacheTrigger

Remarks

The trigger operates on ICacheTriggerEntry object that represents a pending mutation that is about to be committed to the underlying cache. An ICacheTrigger could be registered with any IObservableCache using the CacheTriggerListener class:
CopyC#
INamedCache   cache   = CacheFactory.GetCache(cacheName);
ICacheTrigger trigger = new MyCustomTrigger();
cache.AddCacheListener(new CacheTriggerListener(trigger));
Note: In a clustered environment, ICacheTrigger registration process requires triggers to be serializable and providing a non-default implementation of the GetHashCode() and Equals() methods. Failure to do so may result in duplicate registration and a redundant entry processing by equivalent, but "not equal" ICacheTrigger objects.

See Also