Record Class PythonPoolConfiguration
java.lang.Object
java.lang.Record
io.micronaut.context.python.PythonPoolConfiguration
- Record Components:
enabled- Whether pooling is enabled.size- The size of the pool. Defaults to the number of processors * 2.warnWaitMs- The amount of time to wait for a pooled context before a warning is printed.
@ConfigurationProperties("micronaut.python.pool")
public record PythonPoolConfiguration(boolean enabled, int size, long warnWaitMs)
extends Record
Configuration for the PythonPool.
-
Constructor Summary
ConstructorsConstructorDescriptionPythonPoolConfiguration(boolean enabled, int size, long warnWaitMs) Creates an instance of aPythonPoolConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thewarnWaitMsrecord component.
-
Constructor Details
-
PythonPoolConfiguration
public PythonPoolConfiguration(@Bindable(defaultValue="true") boolean enabled, @Bindable(defaultValue="0") int size, @Bindable(defaultValue="2000") long warnWaitMs) Creates an instance of aPythonPoolConfigurationrecord class.- Parameters:
enabled- the value for theenabledrecord componentsize- the value for thesizerecord componentwarnWaitMs- the value for thewarnWaitMsrecord component
-
-
Method Details
-
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. -
enabled
-
size
-
warnWaitMs
Returns the value of thewarnWaitMsrecord component.- Returns:
- the value of the
warnWaitMsrecord component
-