Record Class DiscoveryEvent
java.lang.Object
java.lang.Record
org.j7m.middleware.registry.api.DiscoveryEvent
- Record Components:
timestampMillis- event timestampsource- discovery sourcemessage- safe diagnostic messagemetadata- public event metadata
-
Constructor Summary
ConstructorsConstructorDescriptionDiscoveryEvent(long timestampMillis, DiscoverySource source, String message, Map<String, String> metadata) Creates an immutable event. -
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.message()Returns the value of themessagerecord component.metadata()Returns the value of themetadatarecord component.source()Returns the value of thesourcerecord component.longReturns the value of thetimestampMillisrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DiscoveryEvent
public DiscoveryEvent(long timestampMillis, DiscoverySource source, String message, Map<String, String> metadata) Creates an immutable event.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
timestampMillis
public long timestampMillis()Returns the value of thetimestampMillisrecord component.- Returns:
- the value of the
timestampMillisrecord component
-
source
-
message
-
metadata
-