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

E69640-01

AbstractComparableAggregator Class Reference

#include <coherence/util/aggregator/AbstractComparableAggregator.hpp>

Inherits AbstractAggregator.

List of all members.


Detailed Description

Abstract aggregator that processes values extracted from a set of entries in a Map, with knowledge of how to compare those values.

There are two ways to use the AbstractComparableAggregator:

If the set of entries passed to aggregate is empty, a NULL result is returned.

Author:
djl/pp 2008.05.09

Public Types

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

Public Member Functions

virtual void readExternal (PofReader::Handle hIn)
 
virtual void writeExternal (PofWriter::Handle hOut) const
 

Protected Member Functions

 AbstractComparableAggregator (ValueExtractor::View vExtractor, Comparator::View vComparator=NULL)
 Construct an AbstractComparableAggregator object.
 AbstractComparableAggregator (String::View vsMethod, Comparator::View vComparator=NULL)
 Construct an AbstractComparableAggregator that will aggregate values extracted from a set of InvocableMap::Entry objects.
virtual void init (bool fFinal)
 Initialize the aggregation result.

Parameters:
fFinal true is passed if the aggregation process that is being initialized must produce a final aggregation result; this will only be false if a parallel approach is being used and the initial (partial) aggregation process is being initialized

virtual Object::Holder finalizeResult (bool fFinal)
 Obtain the result of the aggregation.

If the fFinal parameter is true, the returned object must be the final result of the aggregation; otherwise, the returned object will be treated as a partial result that should be incorporated into the final result.

Parameters:
fFinal true to indicate that the final result of the aggregation process should be returned; this will only be false if a parallel approach is being used
Returns:
the result of the aggregation process


Protected Attributes

int32_t m_count
 The count of processed entries.
MemberView< Object > m_vResult
 The running result value.
FinalView< Comparatorf_vComparator
 The comparator to use for comparing extracted values.

Constructor & Destructor Documentation

AbstractComparableAggregator ( ValueExtractor::View  vExtractor,
Comparator::View  vComparator = NULL 
) [protected]

Construct an AbstractComparableAggregator object.

Parameters:
vExtractor the extractor that provides an object to be compared
vComparator the comparator used to compare the extracted object, if NULL then the extracted object must implement Comparable

AbstractComparableAggregator ( String::View  vsMethod,
Comparator::View  vComparator = NULL 
) [protected]

Construct an AbstractComparableAggregator that will aggregate values extracted from a set of InvocableMap::Entry objects.

Parameters:
vsMethod the name of the method that could be invoked via reflection and that returns values to aggregate; this parameter can also be a dot-delimited sequence of method names which would result in an aggregator based on the ChainedExtractor that is based on an array of corresponding ReflectionExtractor objects
vComparator the comparator used to compare the extracted object, if NULL then the extracted object must implement Comparable
Since:
Coherence 12.1.2


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