Record Class WarmingConfig

java.lang.Object
java.lang.Record
com.loomcache.server.cache.WarmingConfig

public record WarmingConfig(int parallelism, int batchSize, long timeoutMs) extends Record
Configuration for cache warming operations. Defines parallelism, batch size, and timeout settings for warming processes.
  • Field Details

  • Constructor Details

    • WarmingConfig

      public WarmingConfig(int parallelism, int batchSize, long timeoutMs)
      Creates an instance of a WarmingConfig record class.
      Parameters:
      parallelism - the value for the parallelism record component
      batchSize - the value for the batchSize record component
      timeoutMs - the value for the timeoutMs record component
  • Method Details

    • defaults

      public static WarmingConfig defaults()
      Create a WarmingConfig with default values.
    • withParallelism

      public static WarmingConfig withParallelism(int parallelism)
      Create a WarmingConfig with custom parallelism.
    • withBatchSize

      public static WarmingConfig withBatchSize(int batchSize)
      Create a WarmingConfig with custom batch size.
    • withTimeout

      public static WarmingConfig withTimeout(long timeoutMs)
      Create a WarmingConfig with custom timeout.
    • 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. All components in this record class 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.
    • parallelism

      public int parallelism()
      Returns the value of the parallelism record component.
      Returns:
      the value of the parallelism record component
    • batchSize

      public int batchSize()
      Returns the value of the batchSize record component.
      Returns:
      the value of the batchSize record component
    • timeoutMs

      public long timeoutMs()
      Returns the value of the timeoutMs record component.
      Returns:
      the value of the timeoutMs record component