Record Class WarmingConfig
java.lang.Object
java.lang.Record
com.loomcache.server.cache.WarmingConfig
Configuration for cache warming operations.
Defines parallelism, batch size, and timeout settings for warming processes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final longstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionWarmingConfig(int parallelism, int batchSize, long timeoutMs) Creates an instance of aWarmingConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebatchSizerecord component.static WarmingConfigdefaults()Create a WarmingConfig with default values.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theparallelismrecord component.longReturns the value of thetimeoutMsrecord component.final StringtoString()Returns a string representation of this record class.static WarmingConfigwithBatchSize(int batchSize) Create a WarmingConfig with custom batch size.static WarmingConfigwithParallelism(int parallelism) Create a WarmingConfig with custom parallelism.static WarmingConfigwithTimeout(long timeoutMs) Create a WarmingConfig with custom timeout.
-
Field Details
-
DEFAULT_PARALLELISM
public static final int DEFAULT_PARALLELISM- See Also:
-
MAX_PARALLELISM
public static final int MAX_PARALLELISM- See Also:
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE- See Also:
-
MAX_BATCH_SIZE
public static final int MAX_BATCH_SIZE- See Also:
-
DEFAULT_TIMEOUT_MS
public static final long DEFAULT_TIMEOUT_MS- See Also:
-
-
Constructor Details
-
WarmingConfig
public WarmingConfig(int parallelism, int batchSize, long timeoutMs) Creates an instance of aWarmingConfigrecord class.- Parameters:
parallelism- the value for theparallelismrecord componentbatchSize- the value for thebatchSizerecord componenttimeoutMs- the value for thetimeoutMsrecord component
-
-
Method Details
-
defaults
Create a WarmingConfig with default values. -
withParallelism
Create a WarmingConfig with custom parallelism. -
withBatchSize
Create a WarmingConfig with custom batch size. -
withTimeout
Create a WarmingConfig with custom timeout. -
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
parallelism
public int parallelism()Returns the value of theparallelismrecord component.- Returns:
- the value of the
parallelismrecord component
-
batchSize
public int batchSize()Returns the value of thebatchSizerecord component.- Returns:
- the value of the
batchSizerecord component
-
timeoutMs
public long timeoutMs()Returns the value of thetimeoutMsrecord component.- Returns:
- the value of the
timeoutMsrecord component
-