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
  • Constructor Details

    • WarmingOptions

      public WarmingOptions(boolean forceRefresh, boolean stopOnError, Duration timeout)
      Creates an instance of a WarmingOptions record class.
      Parameters:
      forceRefresh - the value for the forceRefresh record component
      stopOnError - the value for the stopOnError record component
      timeout - the value for the timeout record component
  • Method Details

    • defaults

      public static CacheWarmer.WarmingOptions defaults()
      Returns default warming options | 返回默认预热选项
      Returns:
      default options | 默认选项
    • builder

      public static CacheWarmer.WarmingOptions.Builder builder()
      Creates a new Builder | 创建新的构建器
      Returns:
      builder | 构建器
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • forceRefresh

      public boolean forceRefresh()
      Returns the value of the forceRefresh record component.
      Returns:
      the value of the forceRefresh record component
    • stopOnError

      public boolean stopOnError()
      Returns the value of the stopOnError record component.
      Returns:
      the value of the stopOnError record component
    • timeout

      public Duration timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component