Record Class EppMetric
java.lang.Object
java.lang.Record
google.registry.monitoring.whitebox.EppMetric
public record EppMetric(org.joda.time.DateTime startTimestamp, org.joda.time.DateTime endTimestamp, Optional<String> commandName, Optional<String> registrarId, Optional<String> tld, Optional<Result.Code> status)
extends Record
A record for recording attributes of an EPP metric.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic EppMetric.Builder
builder()
Create anEppMetric.Builder
.static EppMetric.Builder
builderForRequest
(Clock clock) Create anEppMetric.Builder
for a request context, with the given request ID and with start and end timestamps taken from the given clock.Returns the value of thecommandName
record component.org.joda.time.DateTime
Returns the value of theendTimestamp
record component.final boolean
Indicates whether some other object is "equal to" this one.org.joda.time.DateTime
org.joda.time.DateTime
getTld()
final int
hashCode()
Returns a hash code value for this object.Returns the value of theregistrarId
record component.org.joda.time.DateTime
Returns the value of thestartTimestamp
record component.status()
Returns the value of thestatus
record component.tld()
Returns the value of thetld
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
EppMetric
public EppMetric(org.joda.time.DateTime startTimestamp, org.joda.time.DateTime endTimestamp, Optional<String> commandName, Optional<String> registrarId, Optional<String> tld, Optional<Result.Code> status) Creates an instance of aEppMetric
record class.- Parameters:
startTimestamp
- the value for thestartTimestamp
record componentendTimestamp
- the value for theendTimestamp
record componentcommandName
- the value for thecommandName
record componentregistrarId
- the value for theregistrarId
record componenttld
- the value for thetld
record componentstatus
- the value for thestatus
record component
-
-
Method Details
-
builder
Create anEppMetric.Builder
. -
builderForRequest
Create anEppMetric.Builder
for a request context, with the given request ID and with start and end timestamps taken from the given clock.The start timestamp is recorded now, and the end timestamp at
build()
. -
getStartTimestamp
public org.joda.time.DateTime getStartTimestamp() -
getEndTimestamp
public org.joda.time.DateTime getEndTimestamp() -
getCommandName
-
getRegistrarId
-
getTld
-
getStatus
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
startTimestamp
public org.joda.time.DateTime startTimestamp()Returns the value of thestartTimestamp
record component.- Returns:
- the value of the
startTimestamp
record component
-
endTimestamp
public org.joda.time.DateTime endTimestamp()Returns the value of theendTimestamp
record component.- Returns:
- the value of the
endTimestamp
record component
-
commandName
Returns the value of thecommandName
record component.- Returns:
- the value of the
commandName
record component
-
registrarId
Returns the value of theregistrarId
record component.- Returns:
- the value of the
registrarId
record component
-
tld
Returns the value of thetld
record component.- Returns:
- the value of the
tld
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-