Record Class CacheWarmer.WarmingOptions
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.warming.CacheWarmer.WarmingOptions
- Record Components:
forceRefresh- whether to force refresh existing entries | 是否强制刷新现有条目stopOnError- whether to stop on first error | 是否在首个错误时停止timeout- the warming timeout | 预热超时时间
- Enclosing class:
CacheWarmer<K,V>
public static record CacheWarmer.WarmingOptions(boolean forceRefresh, boolean stopOnError, Duration timeout)
extends Record
Warming options
预热选项
- Since:
- JDK 25, opencode-base-cache V2.0.5
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for WarmingOptions | WarmingOptions 构建器 -
Constructor Summary
ConstructorsConstructorDescriptionWarmingOptions(boolean forceRefresh, boolean stopOnError, Duration timeout) Creates an instance of aWarmingOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new Builder | 创建新的构建器static CacheWarmer.WarmingOptionsdefaults()Returns default warming options | 返回默认预热选项final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforceRefreshrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thestopOnErrorrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WarmingOptions
Creates an instance of aWarmingOptionsrecord class.- Parameters:
forceRefresh- the value for theforceRefreshrecord componentstopOnError- the value for thestopOnErrorrecord componenttimeout- the value for thetimeoutrecord component
-
-
Method Details
-
defaults
Returns default warming options | 返回默认预热选项- Returns:
- default options | 默认选项
-
builder
Creates a new Builder | 创建新的构建器- Returns:
- builder | 构建器
-
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. -
forceRefresh
public boolean forceRefresh()Returns the value of theforceRefreshrecord component.- Returns:
- the value of the
forceRefreshrecord component
-
stopOnError
public boolean stopOnError()Returns the value of thestopOnErrorrecord component.- Returns:
- the value of the
stopOnErrorrecord component
-
timeout
-