public class SummarizerFromJson extends Object implements Summarizer
Modifier and Type | Method and Description |
---|---|
static <T> Summarizer |
custom(Function<Integer,String> producer,
Digester digester,
BucketSelector selector)
Builds a custom summarizer.
|
static <T> Summarizer |
simple(Function<Integer,String> producer)
Builds a simple summarizer.
|
Summary |
summarize(int level)
Produces a summary at a given level of detail.
|
public Summary summarize(int level)
Summarizer
The larger detail level is, the bigger summary will consume on the wire, but the more information it conveys.
summarize
in interface Summarizer
level
- the level of detail.public static <T> Summarizer simple(Function<Integer,String> producer)
producer
- function which fetches the JSON payload corresponding to a given level.SHA-1 digester
and default bucket selector.public static <T> Summarizer custom(Function<Integer,String> producer, Digester digester, BucketSelector selector)
producer
- function which fetches the JSON payload corresponding to a given level.digester
- the custom digester to use.selector
- the strategy to choose buckets to store items in.Copyright © 2014. All rights reserved.