Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.coherence.rest.util.aggregator
Class DefaultAggregatorFactory

java.lang.Object
  extended by com.tangosol.coherence.rest.util.aggregator.DefaultAggregatorFactory

All Implemented Interfaces:
AggregatorFactory

public class DefaultAggregatorFactory
extends java.lang.Object
implements AggregatorFactory

The default implementation of AggregatorFactory.

This AggregatorFactory implementation is used for aggregators that accept a single ValueExtractor argument in the constructor and require no additional configuration.

Author:
vp 2011.07.07, ic 2011.07.14

Constructor Summary
DefaultAggregatorFactory(java.lang.Class clzAggr)
          Construct a DefaultAggregatorFactory instance.

 

Method Summary
protected  InvocableMap.EntryAggregator createAggregator(ValueExtractor extractor)
          Create and initialize a new aggregator instance.
 InvocableMap.EntryAggregator getAggregator(java.lang.String[] asArgs)
          Return an aggregator instantiated by calling an aggregator class constructor.
protected  java.lang.reflect.Constructor getConstructor(java.lang.reflect.Constructor[] aCtors)
          Search the given constructors for a constructor that accepts a single ValueExtractor parameter.

 

Constructor Detail

DefaultAggregatorFactory

public DefaultAggregatorFactory(java.lang.Class clzAggr)
Construct a DefaultAggregatorFactory instance.
Parameters:
clzAggr - the aggregator class

Method Detail

getAggregator

public InvocableMap.EntryAggregator getAggregator(java.lang.String[] asArgs)
Return an aggregator instantiated by calling an aggregator class constructor. The invoked constructor is matched using the following rules:
Specified by:
getAggregator in interface AggregatorFactory
Parameters:
asArgs - aggregator configuration arguments
Returns:
an aggregator instance
Throws:
java.lang.IllegalArgumentException - if an appropriate constructor cannot be found

createAggregator

protected InvocableMap.EntryAggregator createAggregator(ValueExtractor extractor)
Create and initialize a new aggregator instance.
Parameters:
extractor - ValueExtractor to use for a constructor parameter
Returns:
an aggregator instance

getConstructor

protected java.lang.reflect.Constructor getConstructor(java.lang.reflect.Constructor[] aCtors)
Search the given constructors for a constructor that accepts a single ValueExtractor parameter. If found, return the constructor; otherwise return the public default constructor, if available.
Parameters:
aCtors - constructor array
Returns:
constructor that accepts a single ValueExtractor parameter or, if such a constructor is not found, the public default constructor if available

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.