Record Class CacheWarmerManager.CacheWarmingResult
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.warming.CacheWarmerManager.CacheWarmingResult
- Record Components:
cacheName- the cache name | 缓存名称entriesLoaded- the number of entries loaded | 加载的条目数duration- the warming duration | 预热持续时间error- the error, if any | 错误(如有)
- Enclosing class:
CacheWarmerManager
public static record CacheWarmerManager.CacheWarmingResult(String cacheName, int entriesLoaded, Duration duration, Throwable error)
extends Record
Result for a single cache warming
单个缓存预热结果
- Since:
- JDK 25, opencode-base-cache V2.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionCacheWarmingResult(String cacheName, int entriesLoaded, Duration duration, Throwable error) Creates an instance of aCacheWarmingResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecacheNamerecord component.duration()Returns the value of thedurationrecord component.intReturns the value of theentriesLoadedrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.booleanisSuccess | isSuccessfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CacheWarmingResult
Creates an instance of aCacheWarmingResultrecord class.- Parameters:
cacheName- the value for thecacheNamerecord componententriesLoaded- the value for theentriesLoadedrecord componentduration- the value for thedurationrecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
isSuccess
public boolean isSuccess()isSuccess | isSuccess- Returns:
- the result | 结果
-
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. -
cacheName
-
entriesLoaded
public int entriesLoaded()Returns the value of theentriesLoadedrecord component.- Returns:
- the value of the
entriesLoadedrecord component
-
duration
-
error
-