Oracle Coherence for C++ API
Release 3.6.0.0

E15728-01

coherence/util/aggregator/AbstractInteger64Aggregator.hpp

00001 /*
00002 * AbstractInteger64Aggregator.hpp
00003 *
00004 * Copyright (c) 2000, 2010, 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_ABSTRACT_INTEGER64_AGGREGATOR_HPP
00017 #define COH_ABSTRACT_INTEGER64_AGGREGATOR_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/aggregator/AbstractAggregator.hpp"
00022 #include "coherence/util/ValueExtractor.hpp"
00023 
00024 COH_OPEN_NAMESPACE3(coherence,util,aggregator)
00025 
00026 
00027 /**
00028 * Abstract aggregator that processes numeric values extracted from a set of
00029 * entries in a Map. All the extracted Number objects will be treated as
00030 * <tt>int64_t</tt> values and the result of the aggregator is a Integer64.
00031 * If the set of entries is empty, a <tt>NULL</tt> result is returned.
00032 *
00033 * @author djl  2008.05.09
00034 */
00035 class COH_EXPORT AbstractInteger64Aggregator
00036     : public abstract_spec<AbstractInteger64Aggregator,
00037         extends<AbstractAggregator> >
00038     {
00039     // ----- constructors ---------------------------------------------------
00040 
00041     protected:
00042         /**
00043         * @internal
00044         */
00045         AbstractInteger64Aggregator();
00046 
00047         /**
00048         * @internal
00049         */
00050         AbstractInteger64Aggregator(ValueExtractor::View vExtractor);
00051 
00052 
00053     // ----- AbstractAggregator Interface  ----------------------------------
00054 
00055     protected:
00056         /**
00057         * {@inheritDoc}
00058         */
00059         virtual void init(bool fFinal);
00060 
00061         /**
00062         * {@inheritDoc}
00063         */
00064         virtual Object::Holder finalizeResult(bool fFinal);
00065 
00066 
00067     // ----- data members ---------------------------------------------------
00068 
00069     protected:
00070         /**
00071         * The count of processed entries.
00072         */
00073         int32_t m_count;
00074 
00075         /**
00076         * The running result value.
00077         */
00078         int64_t m_lResult;
00079     };
00080 
00081 COH_CLOSE_NAMESPACE3
00082 
00083 #endif // COH_ABSTRACT_INTEGER64_AGGREGATOR_HPP
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.