Class AggregatorRegistry
java.lang.Object
com.tangosol.coherence.rest.util.aggregator.AggregatorRegistry
A registry for
AggregatorFactory
instances.- Author:
- vp 2011.07.07
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Regex pattern that defines the aggregator request syntax. -
Constructor Summary
ConstructorDescriptionConstruct an AggregatorRegistry.AggregatorRegistry
(Collection<AggregatorConfig> colConfig) Construct an AggregatorRegistry that includes built-in aggregators in addition to the specified aggregators. -
Method Summary
Modifier and TypeMethodDescriptiongetAggregator
(String sRequest) Returns a configured aggregator.void
register
(String sName, AggregatorFactory factory) Register an aggregator factory with the given name.void
Register an aggregator or aggregator factory with the given name.void
register
(Collection<AggregatorConfig> colConfig) Register a collection of aggregators.
-
Field Details
-
AGGREGATOR_REQUEST_REGEX
Regex pattern that defines the aggregator request syntax.- See Also:
-
-
Constructor Details
-
AggregatorRegistry
public AggregatorRegistry()Construct an AggregatorRegistry.By default the following built-in aggregators will be registered:
- big-decimal-average
- big-decimal-max
- big-decimal-min
- big-decimal-sum
- comparable-max
- comparable-min
- count
- distinct-values
- double-average
- double-max
- double-min
- double-sum
- long-max
- long-min
- long-sum
-
AggregatorRegistry
Construct an AggregatorRegistry that includes built-in aggregators in addition to the specified aggregators.- Parameters:
colConfig
- aggregator configurations
-
-
Method Details
-
getAggregator
Returns a configured aggregator.- Parameters:
sRequest
- the aggregator request- Returns:
- aggregator
-
register
Register an aggregator factory with the given name.- Parameters:
sName
- the aggregator namefactory
- the aggregator factory
-
register
Register an aggregator or aggregator factory with the given name.A
DefaultAggregatorFactory
will be used if theclz
parameter is a class that implements InvocableMap.EntryAggregator.- Parameters:
sName
- the aggregator nameclz
- the aggregator or aggregator factory class
-
register
Register a collection of aggregators.- Parameters:
colConfig
- the aggregator configurations
-