public static class TimerDescriptor.TimerDescriptorBuilder extends MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>
TimerDescriptor be
specified during its own construction. Values may also be specified for
the optional arguments needed for a TimerDescriptor, but these
values are defaulted in the event that no value is specified for them.appId, description, jmx, name, persist, primaryTag, secondaryTag, summaryMinutes, type| Constructor and Description |
|---|
TimerDescriptor.TimerDescriptorBuilder(String name)
Creates a new
TimerDescriptor.TimerDescriptorBuilder using only the arguments
that are required to build a valid TimerDescriptor. |
| Modifier and Type | Method and Description |
|---|---|
TimerDescriptor.TimerDescriptorBuilder |
appId(String toSet)
Sets the application ID to apply to the
MetricDescriptor that
will be built. |
TimerDescriptor |
build()
Build a
TimerDescriptor instance. |
TimerDescriptor.TimerDescriptorBuilder |
description(String toSet)
Sets the description to apply to the
MetricDescriptor that
will be built. |
TimerDescriptor.TimerDescriptorBuilder |
name(String toSet)
Sets the name to apply to the
MetricDescriptor that will be
built. |
TimerDescriptor.TimerDescriptorBuilder |
persist(boolean toSet)
Sets the flag that indicates whether the
MetricDescriptor
that will be built is to be persisted. |
TimerDescriptor.TimerDescriptorBuilder |
primaryTag(String toSet)
Sets the primary tag (e.g.
|
TimerDescriptor.TimerDescriptorBuilder |
publishToJmx(boolean toSet)
Sets the flag that indicates whether the
MetricDescriptor
that will be built should be made visible via JMX. |
TimerDescriptor.TimerDescriptorBuilder |
secondaryTag(String toSet)
Sets the secondary tag (e.g.
|
TimerDescriptor.TimerDescriptorBuilder |
summaryMinutes(MetricDescriptor.SummaryIntervalMinutes toSet)
Sets the number of minutes that should elapse between the persistence
of summarized values to apply to the
MetricDescriptor that
will be built. |
TimerDescriptor.TimerDescriptorBuilder |
type(MetricDescriptor.Type toSet)
Sets the metric type to apply to the
MetricDescriptor that
will be built. |
public TimerDescriptor.TimerDescriptorBuilder(String name)
TimerDescriptor.TimerDescriptorBuilder using only the arguments
that are required to build a valid TimerDescriptor. If no
other fields are set via other methods before building, the resulting
TimerDescriptor will specify a TimeStampedTimer
associated with no specific application, no primary or secondary
tags, no description, and that the resulting TimeStampedTimer
should be persisted using the default summarization interval and
should not be visible via JMX.name - a name for the TimeStampedTimer (e.g.
"txPacketQueue")public TimerDescriptor build()
TimerDescriptor instance.build in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>TimerDescriptorpublic TimerDescriptor.TimerDescriptorBuilder appId(String toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor that
will be built.appId in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - application IDpublic TimerDescriptor.TimerDescriptorBuilder description(String toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor that
will be built.description in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - descriptionpublic TimerDescriptor.TimerDescriptorBuilder name(String toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor that will be
built. Many metrics may have the same name (e.g. "txPackets") but
can be distinguished from one another via the primary and secondary
tags specified.name in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - namepublic TimerDescriptor.TimerDescriptorBuilder persist(boolean toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor
that will be built is to be persisted. true indicates that
the value should be persisted, false that it shouldn't.persist in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - persistence flagpublic TimerDescriptor.TimerDescriptorBuilder primaryTag(String toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor that will be built. The tag can be anything that
is a useful identifier to group metrics by.primaryTag in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - primary tagpublic TimerDescriptor.TimerDescriptorBuilder publishToJmx(boolean toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor
that will be built should be made visible via JMX. true
indicates that the value should be visible, false that it
shouldn't.publishToJmx in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - JMX flagpublic TimerDescriptor.TimerDescriptorBuilder secondaryTag(String toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor that will be built. The tag can be anything that
is a useful identifier to group metrics by, but should make sense in
the context of the specified primary tag.secondaryTag in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - secondary tagpublic TimerDescriptor.TimerDescriptorBuilder summaryMinutes(MetricDescriptor.SummaryIntervalMinutes toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor that
will be built.summaryMinutes in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - summarization interval (in minutes)public TimerDescriptor.TimerDescriptorBuilder type(MetricDescriptor.Type toSet)
MetricDescriptor.MetricDescriptorBuilderMetricDescriptor that
will be built.type in class MetricDescriptor.MetricDescriptorBuilder<TimerDescriptor>toSet - metric typeCopyright © 2014. All Rights Reserved.