Class DefaultRecord.Builder
java.lang.Object
com.arpnetworking.commons.builder.OvalBuilder<T>
com.arpnetworking.commons.builder.ThreadLocalBuilder<Record>
com.arpnetworking.metrics.mad.model.DefaultRecord.Builder
- All Implemented Interfaces:
com.arpnetworking.commons.builder.Builder<Record>
- Enclosing class:
- DefaultRecord
public static final class DefaultRecord.Builder
extends com.arpnetworking.commons.builder.ThreadLocalBuilder<Record>
Builder
implementation for
DefaultRecord
.- Author:
- Ville Koskela (ville dot koskela at inscopemetrics dot io)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
reset()
setAnnotations
(com.google.common.collect.ImmutableMap<String, String> value) The annotationsImmutableMap
.setDimensions
(com.google.common.collect.ImmutableMap<String, String> value) The dimension mappingsImmutableMap
.The identifier of the record.setMetrics
(com.google.common.collect.ImmutableMap<String, ? extends Metric> value) The named metricsImmutableMap
.setRequestTime
(ZonedDateTime value) The timestamp at which the record was received.setTime
(ZonedDateTime value) The timestamp of the record.Methods inherited from class com.arpnetworking.commons.builder.ThreadLocalBuilder
build, build, buildGeneric, clone, clone
Methods inherited from class com.arpnetworking.commons.builder.OvalBuilder
clone, clone, construct, isSelfValidating, toString, validate
-
Constructor Details
-
Builder
public Builder()Public constructor.
-
-
Method Details
-
setMetrics
public DefaultRecord.Builder setMetrics(com.google.common.collect.ImmutableMap<String, ? extends Metric> value) The named metricsImmutableMap
. Cannot be null.- Parameters:
value
- The named metricsImmutableMap
.- Returns:
- This instance of
DefaultRecord.Builder
.
-
setId
The identifier of the record. Cannot be null or empty.- Parameters:
value
- The identifier.- Returns:
- This instance of
DefaultRecord.Builder
.
-
setTime
The timestamp of the record. Cannot be null.- Parameters:
value
- The timestamp.- Returns:
- This instance of
DefaultRecord.Builder
.
-
setRequestTime
The timestamp at which the record was received. Can be null.- Parameters:
value
- The timestamp.- Returns:
- This instance of
DefaultRecord.Builder
.
-
setAnnotations
public DefaultRecord.Builder setAnnotations(com.google.common.collect.ImmutableMap<String, String> value) The annotationsImmutableMap
. Optional. Default is an emptyImmutableMap
. Cannot be null.- Parameters:
value
- The annotationsImmutableMap
.- Returns:
- This instance of
DefaultRecord.Builder
.
-
setDimensions
public DefaultRecord.Builder setDimensions(com.google.common.collect.ImmutableMap<String, String> value) The dimension mappingsImmutableMap
. Optional. Default is an emptyImmutableMap
. Cannot be null.- Parameters:
value
- The dimension mappingsImmutableMap
- Returns:
- This instance of
DefaultRecord.Builder
.
-
reset
protected void reset()- Specified by:
reset
in classcom.arpnetworking.commons.builder.ThreadLocalBuilder<Record>
-