Package com.orbitz.consul.model.agent
Class ImmutableTelemetry
- java.lang.Object
-
- com.orbitz.consul.model.agent.Telemetry
-
- com.orbitz.consul.model.agent.ImmutableTelemetry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTelemetry.BuilderBuilds instances of typeImmutableTelemetry.
-
Method Summary
Modifier and Type Method Description static ImmutableTelemetry.Builderbuilder()Creates a builder forImmutableTelemetry.static ImmutableTelemetrycopyOf(Telemetry instance)Creates an immutable copy of aTelemetryvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableTelemetrythat have equal attribute values.java.lang.BooleangetDisableHostname()java.lang.StringgetDogStatsdAddr()java.util.Optional<java.util.List<java.lang.String>>getDogStatsdTags()java.lang.StringgetStatsdAddr()java.lang.StringgetStatsiteAddr()java.lang.StringgetStatsitePrefix()inthashCode()Computes a hash code from attributes:statsiteAddr,statsdAddr,statsitePrefix,disableHostname,dogStatsdAddr,dogStatsdTags.java.lang.StringtoString()Prints the immutable valueTelemetrywith attribute values.ImmutableTelemetrywithDisableHostname(java.lang.Boolean value)Copy the current immutable object by setting a value for thedisableHostnameattribute.ImmutableTelemetrywithDogStatsdAddr(java.lang.String value)Copy the current immutable object by setting a value for thedogStatsdAddrattribute.ImmutableTelemetrywithDogStatsdTags(java.util.List<java.lang.String> value)Copy the current immutable object by setting a present value for the optionaldogStatsdTagsattribute.ImmutableTelemetrywithDogStatsdTags(java.util.Optional<? extends java.util.List<java.lang.String>> optional)Copy the current immutable object by setting an optional value for thedogStatsdTagsattribute.ImmutableTelemetrywithStatsdAddr(java.lang.String value)Copy the current immutable object by setting a value for thestatsdAddrattribute.ImmutableTelemetrywithStatsiteAddr(java.lang.String value)Copy the current immutable object by setting a value for thestatsiteAddrattribute.ImmutableTelemetrywithStatsitePrefix(java.lang.String value)Copy the current immutable object by setting a value for thestatsitePrefixattribute.
-
-
-
Method Detail
-
getStatsiteAddr
public java.lang.String getStatsiteAddr()
- Specified by:
getStatsiteAddrin classTelemetry- Returns:
- The value of the
statsiteAddrattribute
-
getStatsdAddr
public java.lang.String getStatsdAddr()
- Specified by:
getStatsdAddrin classTelemetry- Returns:
- The value of the
statsdAddrattribute
-
getStatsitePrefix
public java.lang.String getStatsitePrefix()
- Specified by:
getStatsitePrefixin classTelemetry- Returns:
- The value of the
statsitePrefixattribute
-
getDisableHostname
public java.lang.Boolean getDisableHostname()
- Specified by:
getDisableHostnamein classTelemetry- Returns:
- The value of the
disableHostnameattribute
-
getDogStatsdAddr
public java.lang.String getDogStatsdAddr()
- Specified by:
getDogStatsdAddrin classTelemetry- Returns:
- The value of the
dogStatsdAddrattribute
-
getDogStatsdTags
public java.util.Optional<java.util.List<java.lang.String>> getDogStatsdTags()
- Specified by:
getDogStatsdTagsin classTelemetry- Returns:
- The value of the
dogStatsdTagsattribute
-
withStatsiteAddr
public final ImmutableTelemetry withStatsiteAddr(java.lang.String value)
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
public final ImmutableTelemetry withStatsdAddr(java.lang.String value)
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
public final ImmutableTelemetry withStatsitePrefix(java.lang.String value)
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
public final ImmutableTelemetry withDisableHostname(java.lang.Boolean value)
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
public final ImmutableTelemetry withDogStatsdAddr(java.lang.String value)
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
public final ImmutableTelemetry withDogStatsdTags(java.util.List<java.lang.String> value)
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
public final ImmutableTelemetry withDogStatsdTags(java.util.Optional<? extends java.util.List<java.lang.String>> optional)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableTelemetrythat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:statsiteAddr,statsdAddr,statsitePrefix,disableHostname,dogStatsdAddr,dogStatsdTags.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueTelemetrywith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableTelemetry copyOf(Telemetry instance)
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
public static ImmutableTelemetry.Builder 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
-
-