Record Class DemoQueryResult
java.lang.Object
java.lang.Record
com.maybeitssquid.rotatingsecrets.DemoQueryResult
- Record Components:
threadName- name identifying which polling thread executed the querytimestamp- instant when the query was executed (client-side)databaseTime- current time as reported by the database server
public record DemoQueryResult(String threadName, Instant timestamp, String databaseTime)
extends Record
Result of a database poll operation.
-
Constructor Summary
ConstructorsConstructorDescriptionDemoQueryResult(String threadName, Instant timestamp, String databaseTime) Creates an instance of aDemoQueryResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedatabaseTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thethreadNamerecord component.Returns the value of thetimestamprecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
DemoQueryResult
Creates an instance of aDemoQueryResultrecord class.- Parameters:
threadName- the value for thethreadNamerecord componenttimestamp- the value for thetimestamprecord componentdatabaseTime- the value for thedatabaseTimerecord component
-
-
Method Details
-
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). -
threadName
Returns the value of thethreadNamerecord component.- Returns:
- the value of the
threadNamerecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
databaseTime
Returns the value of thedatabaseTimerecord component.- Returns:
- the value of the
databaseTimerecord component
-