Interface Metrics.TopicMetricCollector.Builder
- All Superinterfaces:
Metrics.Builder<Metrics.TopicMetricCollector.Builder>
- Enclosing interface:
- Metrics.TopicMetricCollector
public static interface Metrics.TopicMetricCollector.Builder
extends Metrics.Builder<Metrics.TopicMetricCollector.Builder>
A topic metric collector builder.
A builder of this type may be created using
newTopicMetricCollectorBuilder
and used to create instances of
Metrics.TopicMetricCollector
that can be supplied to
putTopicMetricCollector
.
-
Method Summary
Modifier and TypeMethodDescriptionCreate a newMetrics.TopicMetricCollector
using the values currently known to this builder.groupByPathPrefixParts
(int parts) Specifies the number of leading parts of the topic path the metric collector should use to group results.groupByTopicType
(boolean groupByTopicType) Specifies whether the metric collector should group by topic type.groupByTopicView
(boolean groupByTopicView) Specifies whether the metric collector should group by topic view.Methods inherited from interface com.pushtechnology.diffusion.client.features.control.Metrics.Builder
exportToPrometheus, maximumGroups, reset
-
Method Details
-
groupByTopicType
Specifies whether the metric collector should group by topic type.By default a topic metric collector does not group by topic type.
- Parameters:
groupByTopicType
- true to indicate that the collector should group by topic type- Returns:
- this builder
-
groupByPathPrefixParts
Specifies the number of leading parts of the topic path the metric collector should use to group results.By default a topic metric collector does not group by the topic path prefix. If a positive number of parts is specified, it will enable grouping.
- Parameters:
parts
- the number of leading parts of the topic path to group by; set to 0 to disable grouping by path- Returns:
- this builder
- Since:
- 6.8
-
groupByTopicView
Specifies whether the metric collector should group by topic view.By default a topic metric collector does not group by topic view.
- Parameters:
groupByTopicView
- true to indicate that the collector should group by topic view- Returns:
- this builder
- Since:
- 6.9
-
create
Create a newMetrics.TopicMetricCollector
using the values currently known to this builder.- Parameters:
name
- the name of theMetrics.TopicMetricCollector
topicSelector
- the selector pattern that specifies the topics for which metrics are to be collected- Returns:
- a new
Metrics.TopicMetricCollector
with all of the current settings of this builder - Throws:
IllegalArgumentException
- if this builder has been configured usinggroupByPathPrefixParts(int)
and a negative number of parts
-