#include <coherence/util/aggregator/PriorityAggregator.hpp>
Inherits AbstractPriorityTask.
For example, let's assume that there is an Orders cache that belongs to a partitioned cache service configured with a request-timeout and task-timeout of 5 seconds. Also assume that we are willing to wait longer for a particular aggregation request that scans the entire cache. Then we could override the default timeout values by using the PriorityAggregator as follows:
Float64Average::Handle aggrStandard = Float64Average::create(ReflectionExtractor::create("getPrice")); PriorityAggregator::Handle aggrPriority = PriorityAggregator::create(aggrStandard); aggrPriority->setExecutionTimeoutMillis(PriorityTask::timeout_none); aggrPriority->setRequestTimeoutMillis(PriorityTask::timeout_none); cacheOrders->aggregate(NULL, aggrPriority);
This is an advanced feature which should be used judiciously.
Public Types | |
typedef spec::Handle | Handle |
PriorityAggregator Handle definition. | |
typedef spec::View | View |
PriorityAggregator View definition. | |
typedef spec::Holder | Holder |
PriorityAggregator 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 TypedHandle < const String > | toString () const |
virtual InvocableMap::ParallelAwareAggregator::Handle | getAggregator () |
Obtain the underlying aggregator. | |
virtual InvocableMap::ParallelAwareAggregator::View | getAggregator () const |
Obtain the underlying aggregator. | |
Protected Member Functions | |
PriorityAggregator () | |
Default constructor (necessary for the PortableObject interface). | |
PriorityAggregator (InvocableMap::ParallelAwareAggregator::Handle hAggregator) | |
Construct a PriorityAggregator. |
PriorityAggregator | ( | InvocableMap::ParallelAwareAggregator::Handle | hAggregator | ) | [protected] |
Construct a PriorityAggregator.
hAggregator | the aggregator wrapped by this PriorityAggregator |
virtual InvocableMap::ParallelAwareAggregator::Handle getAggregator | ( | ) | [virtual] |
virtual InvocableMap::ParallelAwareAggregator::View getAggregator | ( | ) | const [virtual] |