Record Class CachedEndpointsController.CachedEndpointDTO
java.lang.Object
java.lang.Record
edu.ucsb.cs156.diningcachingproxy.controller.CachedEndpointsController.CachedEndpointDTO
- Enclosing class:
CachedEndpointsController
-
Constructor Summary
ConstructorsConstructorDescriptionCachedEndpointDTO(CachedResponse cachedResponse) CachedEndpointDTO(String id, String requestPath, long hitCount, int responseStatus, String responseBody, Instant cachedAt) Creates an instance of aCachedEndpointDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncachedAt()Returns the value of thecachedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longhitCount()Returns the value of thehitCountrecord component.id()Returns the value of theidrecord component.Returns the value of therequestPathrecord component.Returns the value of theresponseBodyrecord component.intReturns the value of theresponseStatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedEndpointDTO
-
CachedEndpointDTO
public CachedEndpointDTO(String id, String requestPath, long hitCount, int responseStatus, String responseBody, Instant cachedAt) Creates an instance of aCachedEndpointDTOrecord class.- Parameters:
id- the value for theidrecord componentrequestPath- the value for therequestPathrecord componenthitCount- the value for thehitCountrecord componentresponseStatus- the value for theresponseStatusrecord componentresponseBody- the value for theresponseBodyrecord componentcachedAt- the value for thecachedAtrecord component
-
-
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. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
requestPath
Returns the value of therequestPathrecord component.- Returns:
- the value of the
requestPathrecord component
-
hitCount
public long hitCount()Returns the value of thehitCountrecord component.- Returns:
- the value of the
hitCountrecord component
-
responseStatus
public int responseStatus()Returns the value of theresponseStatusrecord component.- Returns:
- the value of the
responseStatusrecord component
-
responseBody
Returns the value of theresponseBodyrecord component.- Returns:
- the value of the
responseBodyrecord component
-
cachedAt
Returns the value of thecachedAtrecord component.- Returns:
- the value of the
cachedAtrecord component
-