Oracle Coherence for C++ API
Release 3.7.0.0

E18684-01

coherence/util/aggregator/ParallelCompositeAggregator.hpp

00001 /*
00002 * ParallelCompositeAggregator.hpp
00003 *
00004 * Copyright (c) 2000, 2011, 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_PARALLEL_COMPOSITE_AGGREGATOR_HPP
00017 #define COH_PARALLEL_COMPOSITE_AGGREGATOR_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/aggregator/CompositeAggregator.hpp"
00022 #include "coherence/util/InvocableMap.hpp"
00023 
00024 COH_OPEN_NAMESPACE3(coherence,util,aggregator)
00025 
00026 
00027 /**
00028 * ParallelCompositeAggregator provides an ability to execute a collection of
00029 * parallel aware aggregators against the same subset of the entries in an
00030 * InvocableMap, resulting in a list of corresponding aggregation results. The
00031 * size of the returned list will always be equal to the length of the
00032 * aggregators' array.
00033 *
00034 * Unlike many other concrete EntryAggregator implementations that are
00035 * constructed directly, instances of ParallelCompositeAggregator should only
00036 * becreated indirectly by using the factory method of CompositeAggregator.
00037 *
00038 * @author djl  2008.05.16
00039 */
00040 class COH_EXPORT ParallelCompositeAggregator
00041     : public class_spec<ParallelCompositeAggregator,
00042         extends<CompositeAggregator>,
00043         implements<InvocableMap::ParallelAwareAggregator> >
00044     {
00045     friend class factory<ParallelCompositeAggregator>;
00046 
00047     // ----- constructors ---------------------------------------------------
00048 
00049     protected:
00050         /**
00051         * Default constructor (necessary for the PortableObject
00052         * interface).
00053         */
00054         ParallelCompositeAggregator();
00055 
00056         /**
00057         * Construct a ParallelCompositeAggregator based on a
00058         * specified
00059         * coherence::util::InvocableMap::EntryAggregator array.
00060         *
00061         * @param vaAggregator  an array of ParallelAwareAggregator
00062         *                      objects; may not be null
00063         */
00064         ParallelCompositeAggregator(ObjectArray::View vaAggregator);
00065 
00066 
00067     // ----- InvocableMap::ParallelAwareAggregator interface ----------------
00068 
00069     public:
00070         /**
00071         * {@inheritDoc}
00072         */
00073         virtual InvocableMap::EntryAggregator::Handle
00074                 getParallelAggregator();
00075 
00076         /**
00077         * {@inheritDoc}
00078         */
00079         virtual Object::Holder aggregateResults(
00080                 Collection::View vCollResults);
00081     };
00082 
00083 COH_CLOSE_NAMESPACE3
00084 
00085 #endif // COH_PARALLEL_COMPOSITE_AGGREGATOR_HPP
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.