@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableMetricDescriptor extends MetricDescriptor
MetricDescriptor
.
Use the builder to create immutable instances:
ImmutableMetricDescriptor.builder()
.
Modifier and Type | Class and Description |
---|---|
static interface |
ImmutableMetricDescriptor.AnchorBuildStage |
static class |
ImmutableMetricDescriptor.Builder
Builds instances of type
ImmutableMetricDescriptor . |
static interface |
ImmutableMetricDescriptor.BuildFinal |
static interface |
ImmutableMetricDescriptor.IdBuildStage |
static interface |
ImmutableMetricDescriptor.ModuleBuildStage |
static interface |
ImmutableMetricDescriptor.ProjectBuildStage |
Modifier and Type | Method and Description |
---|---|
Object |
anchor()
Instance of the class "containing" this Metric.
|
static ImmutableMetricDescriptor.AnchorBuildStage |
builder()
Creates a builder for
ImmutableMetricDescriptor . |
static ImmutableMetricDescriptor |
copyOf(MetricDescriptor instance)
Creates an immutable copy of a
MetricDescriptor value. |
String |
description()
Human readable description of the Metric.
|
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableMetricDescriptor that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
anchor , project , module , id , description . |
String |
id()
|
String |
module()
Name of OpenDaylight module the Metric is for, unique within given
project() . |
String |
project()
Name of OpenDaylight project the Metric is for, unique at opendaylight.org.
|
String |
toString()
Prints the immutable value
MetricDescriptor with attribute values. |
ImmutableMetricDescriptor |
withAnchor(Object value)
Copy the current immutable object by setting a value for the
anchor attribute. |
ImmutableMetricDescriptor |
withDescription(String value)
Copy the current immutable object by setting a value for the
description attribute. |
ImmutableMetricDescriptor |
withId(String value)
Copy the current immutable object by setting a value for the
id attribute. |
ImmutableMetricDescriptor |
withModule(String value)
Copy the current immutable object by setting a value for the
module attribute. |
ImmutableMetricDescriptor |
withProject(String value)
Copy the current immutable object by setting a value for the
project attribute. |
check
public Object anchor()
anchor
in class MetricDescriptor
public String project()
[a-z0-9]+
(lower case and no dots nor underscores).project
in class MetricDescriptor
public String module()
project()
.
E.g. "vpnmanager" or "lockmanager" or "jobcoordinator" etc.
The project/module/id together must be unique within ODL.
Valid values match [a-z0-9]+
(lower case and no dots nor underscores).module
in class MetricDescriptor
public String id()
project()
+ module()
.
E.g. "jobsPending" or "dropped_packets" or "traffic" etc. The
project/module/id together must be unique within ODL. Valid values match
[a-zA-Z0-9_]+
(lower and upper case and underscore allowed, but
not starting with). The dot character is not allowed here because at least
one of the implementations (Prometheus.io) does not accept dots in its IDs.id
in class MetricDescriptor
public String description()
description
in class MetricDescriptor
public final ImmutableMetricDescriptor withAnchor(Object value)
anchor
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for anchorthis
objectpublic final ImmutableMetricDescriptor withProject(String value)
project
attribute.
An equals check used to prevent copying of the same value by returning this
.value
- A new value for projectthis
objectpublic final ImmutableMetricDescriptor withModule(String value)
module
attribute.
An equals check used to prevent copying of the same value by returning this
.value
- A new value for modulethis
objectpublic final ImmutableMetricDescriptor withId(String value)
id
attribute.
An equals check used to prevent copying of the same value by returning this
.value
- A new value for idthis
objectpublic final ImmutableMetricDescriptor withDescription(String value)
description
attribute.
An equals check used to prevent copying of the same value by returning this
.value
- A new value for descriptionthis
objectpublic boolean equals(@Nullable Object another)
ImmutableMetricDescriptor
that have equal attribute values.public int hashCode()
anchor
, project
, module
, id
, description
.public String toString()
MetricDescriptor
with attribute values.public static ImmutableMetricDescriptor copyOf(MetricDescriptor instance)
MetricDescriptor
value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance
- The instance to copypublic static ImmutableMetricDescriptor.AnchorBuildStage builder()
ImmutableMetricDescriptor
.Copyright © 2019 OpenDaylight. All rights reserved.