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

E90870-01

coherence/util/MapEventTransformer.hpp

00001 /*
00002 * MapEventTransformer.hpp
00003 *
00004 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
00005 *
00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
00007 * affiliates.
00008 *
00009 * This software is the confidential and proprietary information of Oracle
00010 * Corporation. You shall not disclose such confidential and proprietary
00011 * information and shall use it only in accordance with the terms of the
00012 * license agreement you entered into with Oracle.
00013 *
00014 * This notice may not be removed or altered.
00015 */
00016 #ifndef COH_MAP_EVENT_TRANSFORMER_HPP
00017 #define COH_MAP_EVENT_TRANSFORMER_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/MapEvent.hpp"
00022 
00023 COH_OPEN_NAMESPACE2(coherence,util)
00024 
00025 
00026 /**
00027 * MapEventTransformer interface is used to allow an event consumer to change
00028 * the content of a MapEvent destined for the corresponding MapListener.
00029 *
00030 * In general, the #transform method is called after the
00031 * original MapEvent is evaluated by a Filter (such as
00032 * coherence::util::filter::MapEventFilter). The values contained by the
00033 * returned  MapEvent object will be the ones given (sent) to the
00034 * corresponding listener. Returning null will prevent the emission of the
00035 * event altogether.
00036 *
00037 * <b>Note:</b> Currently, the MapEventTransformer interface is supported only
00038 * by partitioned caches.
00039 *
00040 * @see coherence::util::filter::MapEventTransformerFilter
00041 *
00042 * @author djl  2008.05.22
00043 */
00044 class COH_EXPORT MapEventTransformer
00045     : public interface_spec<MapEventTransformer>
00046     {
00047     // ----- MapEventTransformer interface ----------------------------------
00048 
00049     public:
00050         /**
00051         * Transform the specified MapEvent. The values contained by the
00052         * returned MapEvent object will be the ones given (sent) to the
00053         * corresponding listener.
00054         *
00055         * @param hEvent  the original MapEvent object
00056         *
00057         * @return modified MapEvent object or NULL to discard the event
00058         */
00059         virtual MapEvent::Handle transform(
00060                 MapEvent::Handle hEvent) const = 0;
00061     };
00062 
00063 COH_CLOSE_NAMESPACE2
00064 
00065 #endif // COH_MAP_EVENT_TRANSFORMER_HPP
Copyright © 2000, 2019, Oracle and/or its affiliates. All rights reserved.