coherence/util/aggregator/Integer64Sum.hpp

00001 /*
00002 * Integer64Sum.hpp
00003 *
00004 * Copyright (c) 2000, 2009, 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_INTEGER64_SUM_HPP
00017 #define COH_INTEGER64_SUM_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/aggregator/AbstractInteger64Aggregator.hpp"
00022 #include "coherence/util/ValueExtractor.hpp"
00023 
00024 COH_OPEN_NAMESPACE3(coherence,util,aggregator)
00025 
00026 
00027 /**
00028 * Sums up numeric values extracted from a set of entries in a Map. All the
00029 * extracted Number objects will be treated as <tt>int64_t</tt> values.
00030 *
00031 * @author djl  2008.05.12
00032 */
00033 class COH_EXPORT Integer64Sum
00034     : public class_spec<Integer64Sum,
00035         extends<AbstractInteger64Aggregator> >
00036     {
00037     friend class factory<Integer64Sum>;
00038 
00039     // ----- constructors ---------------------------------------------------
00040 
00041     protected:
00042         /**
00043         * Default constructor (necessary for the PortableObject interface).
00044         */
00045         Integer64Sum();
00046 
00047         /**
00048         * Construct a Integer64Sum aggregator.
00049         *
00050         * @param vExtractor  the extractor that provides a value in the form
00051         *                    of any object that is a Number
00052         */
00053         Integer64Sum(ValueExtractor::View vExtractor);
00054 
00055 
00056     // ----- AbstractAggregator Interface  ----------------------------------
00057 
00058     protected:
00059         /**
00060         * {@inheritDoc}
00061         */
00062         virtual void init(bool fFinal);
00063 
00064         /**
00065         * {@inheritDoc}
00066         */
00067         virtual void process(Object::View v, bool fFinal);
00068     };
00069 
00070 COH_CLOSE_NAMESPACE3
00071 
00072 #endif // COH_INTEGER64_SUM_HPP
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.