Record Class MetricSnapshot
java.lang.Object
java.lang.Record
cloud.opencode.base.observability.metric.MetricSnapshot
- Record Components:
id- the metric identifier | 指标标识符type- the metric type (e.g. "counter", "gauge") | 指标类型values- the metric measurements | 指标测量值
MetricSnapshot - An immutable snapshot of a metric's current state
MetricSnapshot - 指标当前状态的不可变快照
Contains the metric identifier, type name, and a map of key-value measurements. All values are defensively copied to ensure immutability.
包含指标标识符、类型名称和键值测量值映射。 所有值均进行防御性拷贝以确保不可变性。
- Since:
- JDK 25, opencode-base-observability V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
MetricSnapshot
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
-
type
-
values
-