Record Class WarmingResult
java.lang.Object
java.lang.Record
com.loomcache.server.cache.WarmingResult
-
Constructor Summary
ConstructorsConstructorDescriptionWarmingResult(long totalLoaded, long totalFailed, long durationMs, Set<String> dataStructuresWarmed) Creates an instance of aWarmingResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataStructuresWarmedrecord component.longReturns the value of thedurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleCalculate the failure rate as a percentage (0-100).doubleCalculate the success rate as a percentage (0-100).doubleGet the throughput in keys per second.final inthashCode()Returns a hash code value for this object.booleanCheck if warming was successful (all keys loaded, no failures).final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalFailedrecord component.longReturns the value of thetotalLoadedrecord component.
-
Constructor Details
-
WarmingResult
public WarmingResult(long totalLoaded, long totalFailed, long durationMs, Set<String> dataStructuresWarmed) Creates an instance of aWarmingResultrecord class.- Parameters:
totalLoaded- the value for thetotalLoadedrecord componenttotalFailed- the value for thetotalFailedrecord componentdurationMs- the value for thedurationMsrecord componentdataStructuresWarmed- the value for thedataStructuresWarmedrecord component
-
-
Method Details
-
getSuccessRate
public double getSuccessRate()Calculate the success rate as a percentage (0-100). -
getFailureRate
public double getFailureRate()Calculate the failure rate as a percentage (0-100). -
getThroughputKeysPerSecond
public double getThroughputKeysPerSecond()Get the throughput in keys per second. -
isSuccessful
public boolean isSuccessful()Check if warming was successful (all keys loaded, no failures). -
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. -
totalLoaded
public long totalLoaded()Returns the value of thetotalLoadedrecord component.- Returns:
- the value of the
totalLoadedrecord component
-
totalFailed
public long totalFailed()Returns the value of thetotalFailedrecord component.- Returns:
- the value of the
totalFailedrecord component
-
durationMs
public long durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-
dataStructuresWarmed
-