Class ImmutableTelemetry
java.lang.Object
org.kiwiproject.consul.model.agent.Telemetry
org.kiwiproject.consul.model.agent.ImmutableTelemetry
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTelemetry
extends Telemetry
Immutable implementation of
Telemetry.
Use the builder to create immutable instances:
ImmutableTelemetry.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTelemetry.Builderbuilder()Creates a builder forImmutableTelemetry.static ImmutableTelemetryCreates an immutable copy of aTelemetryvalue.booleanThis instance is equal to all instances ofImmutableTelemetrythat have equal attribute values.inthashCode()Computes a hash code from attributes:statsiteAddr,statsdAddr,statsitePrefix,disableHostname,dogStatsdAddr,dogStatsdTags.toString()Prints the immutable valueTelemetrywith attribute values.final ImmutableTelemetrywithDisableHostname(Boolean value) Copy the current immutable object by setting a value for thedisableHostnameattribute.final ImmutableTelemetrywithDogStatsdAddr(String value) Copy the current immutable object by setting a value for thedogStatsdAddrattribute.final ImmutableTelemetrywithDogStatsdTags(List<String> value) Copy the current immutable object by setting a present value for the optionaldogStatsdTagsattribute.final ImmutableTelemetrywithDogStatsdTags(Optional<? extends List<String>> optional) Copy the current immutable object by setting an optional value for thedogStatsdTagsattribute.final ImmutableTelemetrywithStatsdAddr(String value) Copy the current immutable object by setting a value for thestatsdAddrattribute.final ImmutableTelemetrywithStatsiteAddr(String value) Copy the current immutable object by setting a value for thestatsiteAddrattribute.final ImmutableTelemetrywithStatsitePrefix(String value) Copy the current immutable object by setting a value for thestatsitePrefixattribute.
-
Method Details
-
getStatsiteAddr
- Specified by:
getStatsiteAddrin classTelemetry- Returns:
- The value of the
statsiteAddrattribute
-
getStatsdAddr
- Specified by:
getStatsdAddrin classTelemetry- Returns:
- The value of the
statsdAddrattribute
-
getStatsitePrefix
- Specified by:
getStatsitePrefixin classTelemetry- Returns:
- The value of the
statsitePrefixattribute
-
getDisableHostname
- Specified by:
getDisableHostnamein classTelemetry- Returns:
- The value of the
disableHostnameattribute
-
getDogStatsdAddr
- Specified by:
getDogStatsdAddrin classTelemetry- Returns:
- The value of the
dogStatsdAddrattribute
-
getDogStatsdTags
- Specified by:
getDogStatsdTagsin classTelemetry- Returns:
- The value of the
dogStatsdTagsattribute
-
withStatsiteAddr
Copy the current immutable object by setting a value for thestatsiteAddrattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for statsiteAddr- Returns:
- A modified copy of the
thisobject
-
withStatsdAddr
Copy the current immutable object by setting a value for thestatsdAddrattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for statsdAddr- Returns:
- A modified copy of the
thisobject
-
withStatsitePrefix
Copy the current immutable object by setting a value for thestatsitePrefixattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for statsitePrefix- Returns:
- A modified copy of the
thisobject
-
withDisableHostname
Copy the current immutable object by setting a value for thedisableHostnameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for disableHostname- Returns:
- A modified copy of the
thisobject
-
withDogStatsdAddr
Copy the current immutable object by setting a value for thedogStatsdAddrattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for dogStatsdAddr- Returns:
- A modified copy of the
thisobject
-
withDogStatsdTags
Copy the current immutable object by setting a present value for the optionaldogStatsdTagsattribute.- Parameters:
value- The value for dogStatsdTags- Returns:
- A modified copy of
thisobject
-
withDogStatsdTags
Copy the current immutable object by setting an optional value for thedogStatsdTagsattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for dogStatsdTags- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableTelemetrythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:statsiteAddr,statsdAddr,statsitePrefix,disableHostname,dogStatsdAddr,dogStatsdTags. -
toString
Prints the immutable valueTelemetrywith attribute values. -
copyOf
Creates an immutable copy of aTelemetryvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Telemetry instance
-
builder
Creates a builder forImmutableTelemetry.ImmutableTelemetry.builder() .statsiteAddr(String) // requiredstatsiteAddr.statsdAddr(String) // requiredstatsdAddr.statsitePrefix(String) // requiredstatsitePrefix.disableHostname(Boolean) // requireddisableHostname.dogStatsdAddr(String) // requireddogStatsdAddr.dogStatsdTags(List<String>) // optionaldogStatsdTags.build();- Returns:
- A new ImmutableTelemetry builder
-