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

E69640-01

TopNAggregator Class Reference

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

List of all members.


Detailed Description

TopNAggregator is a ParallelAwareAggregator that aggregates the top N extracted values into an array.

The extracted values must not be null, but do not need to be unique.

Author:
rhl 2013.04.24

Public Types

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

Public Member Functions

InvocableMap::EntryAggregator::Handle getParallelAggregator ()
 
Object::Holder aggregateResults (Collection::View vColResults)
 
Object::Holder aggregate (Set::View vSetEntries)
 
Object::Holder aggregatePartialResults (Collection::View vColPartialResults)
 
virtual void readExternal (PofReader::Handle hIn)
 
virtual void writeExternal (PofWriter::Handle hOut) const
 

Public Attributes

bool m_fParallel
 True iff this aggregator is to be used in parallel.
FinalView
< ValueExtractor > 
f_vExtractor
 The ValueExtractor used by this aggregator.
FinalView< Comparator > f_vComparator
 The Comparator used to order the extracted values.
int32_t m_cResults
 The maximum number of results to include in the aggregation result.

Protected Member Functions

 TopNAggregator (ValueExtractor::View vExtractor, Comparator::View vComparator, int32_t cResults)
 Construct a TopNAggregator that will aggregate the top extracted values, as determined by the specified comparator.
void addToResult (Iterator::Handle hIterValues, PartialResult::Handle hResult)
 Add the specified values to the result if they are within the top-N.
ObjectArray::Handle finalizeResult (PartialResult::View vResult)
 Finalize the partial aggregation result.

Classes

class  PartialResult
 The sorted partial result. More...

Constructor & Destructor Documentation

TopNAggregator ( ValueExtractor::View  vExtractor,
Comparator::View  vComparator,
int32_t  cResults 
) [protected]

Construct a TopNAggregator that will aggregate the top extracted values, as determined by the specified comparator.

Parameters:
vExtractor the extractor
vComparator the comparator for extracted values
cResults the maximum number of results to return


Member Function Documentation

void addToResult ( Iterator::Handle  hIterValues,
PartialResult::Handle  hResult 
) [protected]

Add the specified values to the result if they are within the top-N.

Parameters:
vIterValues the iterator of values to add
hResult the result

ObjectArray::Handle finalizeResult ( PartialResult::View  vResult  )  [protected]

Finalize the partial aggregation result.

Parameters:
result the partial result
Returns:
the final aggregation result


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