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

E77779-01

AbstractAggregator Class Reference

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

Inherited by AbstractComparableAggregator.

List of all members.


Detailed Description

Abstract base class implementation of coherence::util::InvocableMap::EntryAggregator that supports parallel aggregation.

Author:
djl 2008.05.09

Public Types

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

Public Member Functions

virtual Object::Holder aggregate (Set::View vSetEntries)
 
virtual
InvocableMap::EntryAggregator::Handle 
getParallelAggregator ()
 
virtual Object::Holder aggregateResults (Collection::View vCollResults)
 
virtual void readExternal (PofReader::Handle hIn)
 
virtual void writeExternal (PofWriter::Handle hOut) const
 
virtual bool equals (Object::View v) const
 
virtual size32_t hashCode () const
 
virtual TypedHandle
< const String > 
toString () const
 
virtual
ValueExtractor::View 
getValueExtractor () const
 Determine the ValueExtractor whose values this aggregator is aggregating.

Protected Member Functions

 AbstractAggregator (String::View vsMethod)
 Construct an AbstractAggregator that will aggregate values extracted from a set of InvocableMap::Entry objects.
virtual void init (bool fFinal)=0
 Initialize the aggregation result.
virtual void process (Object::View vO, bool fFinal)=0
 Incorporate one aggregatable value into the result.
virtual Object::Holder finalizeResult (bool fFinal)=0
 Obtain the result of the aggregation.

Protected Attributes

bool m_fParallel
 Set to true if this aggregator realizes that it is going to be used in parallel.
FinalView
< ValueExtractor > 
f_vExtractor
 The ValueExtractor that obtains the value to aggregate from the value that is stored in the Map.

Constructor & Destructor Documentation

AbstractAggregator ( String::View  vsMethod  )  [protected]

Construct an AbstractAggregator 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
Since:
Coherence 12.1.2


Member Function Documentation

virtual void init ( bool  fFinal  )  [protected, pure virtual]

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

Implemented in AbstractComparableAggregator.

virtual void process ( Object::View  vO,
bool  fFinal 
) [protected, pure virtual]

Incorporate one aggregatable value into the result.

If the fFinal parameter is true, the given object is a partial result (returned by an individual parallel aggregator) that should be incorporated into the final result; otherwise, the object is a value extracted from an coherence::util::InvocableMap::Entry.

Parameters:
vO the value to incorporate into the aggregated result
fFinal true to indicate that the given object is a partial result returned by a parallel aggregator

virtual Object::Holder finalizeResult ( bool  fFinal  )  [protected, pure virtual]

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

Implemented in AbstractComparableAggregator.

virtual ValueExtractor::View getValueExtractor (  )  const [virtual]

Determine the ValueExtractor whose values this aggregator is aggregating.

Returns:
the ValueExtractor used by this aggregator


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