public interface MapTrigger<K,V> extends Serializable
MapTrigger.Entry object that represents a pending mutation that is about to be committed to the underlying map. A MapTrigger could be registered with any ObservableMap using the MapTriggerListener class:
NamedCache cache = CacheFactory.getCache(sCacheName); MapTrigger trigger = new MyCustomTrigger(); cache.addMapListener(new MapTriggerListener(trigger));Note: In a clustered environment, MapTrigger registration process requires triggers to be serializable and providing a non-default implementation of the hashCode() and equals() methods. Failure to do so may result in duplicate registration and a redundant entry processing by equivalent, but "not equal" MapTrigger objects.
FilterTrigger| Modifier and Type | Interface and Description | 
|---|---|
| static interface  | MapTrigger.Entry<K,V>A MapTrigger Entry represents a pending change to an Entry that is about to committed to the underlying Map. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | process(MapTrigger.Entry<K,V> entry)This method is called before the result of a mutating operation represented by the specified Entry object is committed into the underlying map. | 
void process(MapTrigger.Entry<K,V> entry)
An implementation of this method can evaluate the change by analyzing the original and the new value, and can perform any of the following:
InvocableMap.Entry.setValue(V) with a different value;MapTrigger.Entry.getOriginalValue();InvocableMap.Entry.remove(boolean);entry - a MapTrigger.Entry object that represents the pending change to be committed to the map, as well as the original state of the Entry