Oracle Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.2)

E26041-01

MapTrigger Class Reference

#include <coherence/util/MapTrigger.hpp>

Inherits Object.

Inherited by FilterTrigger [virtual].

List of all members.


Detailed Description

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

The trigger operates on an 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::Handle hCache = CacheFactory->getCache(vsCacheName);
   MapTrigger::View vTrigger =  MyCustomTrigger::create();
   hCache->addMapListener(MapTriggerListener::create(vTrigger));
 
Note: In a clustered environment, MapTrigger registration process requires triggers to be pofable 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.

See also:
coherence::util::filter::FilterTrigger
Author:
djl 2008.05.22

Public Types

typedef spec::Handle Handle
 MapTrigger Handle definition.
typedef spec::View View
 MapTrigger View definition.
typedef spec::Holder Holder
 MapTrigger Holder definition.

Public Member Functions

virtual void process (MapTrigger::Entry::Handle vEntry)=0
 This method is called before the result of a mutating operation represented by the specified Entry object is committed into the underlying map.

Classes

class  Entry
 A MapTrigger Entry represents a pending change to an Entry that is about to committed to the underlying Map. More...

Member Function Documentation

virtual void process ( MapTrigger::Entry::Handle  vEntry  )  [pure virtual]

This method is called before the result of a mutating operation represented by the specified Entry object is committed into the underlying map.

An implementation of this method can evaluate the change by analyzing the original and the new value, and can perform any of the following:

Parameters:
vEntry a Entry object that represents the pending change to be committed to the map, as well as the original state of the Entry

Implemented in FilterTrigger.


The documentation for this class was generated from the following file:
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.