Record Class DataResponse
java.lang.Object
java.lang.Record
net.swofty.redisapi.api.requests.DataResponse
- Record Components:
data- The data object, will be null if the request has timed out.latency- The latency of the request, normal range is between 1-10ms, unless the server is under heavy load or the Redis server is running on a different machine.
The response to a DataRequest.
-
Constructor Summary
ConstructorsConstructorDescriptionDataResponse(org.json.JSONObject data, long latency) Creates an instance of aDataResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.json.JSONObjectdata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longlatency()Returns the value of thelatencyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DataResponse
-
-
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. -
data
-
latency
-