public class SensorKey
extends java.lang.Object
name and the attributes.
id, which is a string representation of this SensorKey.
Each Sensor is exported as a single managed bean with a unique JMX ObjectName.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Get the attributes of this SensorKey as a Map
|
java.lang.String |
getId()
Get a String representation of this SensorKey that uniquely identifies it.
|
java.lang.String |
getName()
Get the name of this SensorKey
|
int |
hashCode() |
static SensorKey |
of(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> attributes)
Create a new instance of SensorKey from name and a map of attributes
|
static SensorKey |
of(java.lang.String name,
java.lang.String... attributes)
Create a new instance of SensorKey from name and attributes
|
java.lang.String |
toString() |
public static SensorKey of(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> attributes)
name - The metric nameattributes - The map of attributespublic static SensorKey of(java.lang.String name, java.lang.String... attributes)
name - The metric nameattributes - The varargs list of attributes as name1, value1 ... nameN, valueNpublic java.lang.String getId()
public java.lang.String getName()
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2023. All rights reserved.