| Modifier and Type | Method and Description |
|---|---|
Envelope |
build()
Builds a new
Envelope. |
Envelope.Builder |
counter(Counter counter)
Initializes the value for the
counter attribute. |
Envelope.Builder |
event(Event event)
Initializes the value for the
event attribute. |
Envelope.Builder |
from(Envelope instance)
Fill a builder with attribute values from the provided
Envelope instance. |
Envelope.Builder |
gauge(Gauge gauge)
Initializes the value for the
gauge attribute. |
Envelope.Builder |
instanceId(String instanceId)
Initializes the value for the
instanceId attribute. |
Envelope.Builder |
log(Log log)
Initializes the value for the
log attribute. |
Envelope.Builder |
putAllTags(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
tags map. |
Envelope.Builder |
sourceId(String sourceId)
Initializes the value for the
sourceId attribute. |
Envelope.Builder |
tag(Map.Entry<String,? extends String> entry)
Put one entry to the
tags map. |
Envelope.Builder |
tag(String key,
String value)
Put one entry to the
tags map. |
Envelope.Builder |
tags(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
tags map. |
Envelope.Builder |
timer(Timer timer)
Initializes the value for the
timer attribute. |
Envelope.Builder |
timestamp(Long timestamp)
Initializes the value for the
timestamp attribute. |
public final Envelope.Builder from(Envelope instance)
Envelope instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final Envelope.Builder counter(Counter counter)
counter attribute.counter - The value for counter (can be null)this builder for use in a chained invocationpublic final Envelope.Builder event(Event event)
event attribute.event - The value for event (can be null)this builder for use in a chained invocationpublic final Envelope.Builder gauge(Gauge gauge)
gauge attribute.gauge - The value for gauge (can be null)this builder for use in a chained invocationpublic final Envelope.Builder instanceId(String instanceId)
instanceId attribute.instanceId - The value for instanceId (can be null)this builder for use in a chained invocationpublic final Envelope.Builder log(Log log)
log attribute.log - The value for log (can be null)this builder for use in a chained invocationpublic final Envelope.Builder sourceId(String sourceId)
sourceId attribute.sourceId - The value for sourceId (can be null)this builder for use in a chained invocationpublic final Envelope.Builder tag(String key, String value)
tags map.key - The key in the tags mapvalue - The associated value in the tags mapthis builder for use in a chained invocationpublic final Envelope.Builder tag(Map.Entry<String,? extends String> entry)
tags map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final Envelope.Builder tags(Map<String,? extends String> entries)
tags map. Nulls are not permittedentries - The entries that will be added to the tags mapthis builder for use in a chained invocationpublic final Envelope.Builder putAllTags(Map<String,? extends String> entries)
tags map. Nulls are not permittedentries - The entries that will be added to the tags mapthis builder for use in a chained invocationpublic final Envelope.Builder timer(Timer timer)
timer attribute.timer - The value for timer (can be null)this builder for use in a chained invocationpublic final Envelope.Builder timestamp(Long timestamp)
timestamp attribute.timestamp - The value for timestamp (can be null)this builder for use in a chained invocationpublic Envelope build()
Envelope.IllegalStateException - if any required attributes are missingCopyright © 2022. All rights reserved.