Record Class LoomCarrierConfiguration
java.lang.Object
java.lang.Record
io.micronaut.http.netty.channel.loom.LoomCarrierConfiguration
- Record Components:
timeSliceLatency- Time slice size in latency mode.timeSliceThroughput- Time slice size in throughput mode.fifoSwitchTime- Number of nanoseconds between switching between continuation FILO and FIFO modes.taskFifoThreshold- Oldest enqueued continuation must be this old before execution can switch to FIFO mode.blockTime- Maximum blocking wait time.throughputModeThreshold- Maximum number of queued tasks before entering throughput mode.workSpillThreshold- Maximum number of threads per event loop before work spilling should kick in.normalWarmupTasks- Number of tasks that should run on the normal FJP to initialize e.g. the Poller before switching to the netty scheduler
@ConfigurationProperties("micronaut.netty.loom-carrier")
public record LoomCarrierConfiguration(Duration timeSliceLatency, Duration timeSliceThroughput, Duration fifoSwitchTime, Duration taskFifoThreshold, Duration blockTime, int throughputModeThreshold, int workSpillThreshold, int normalWarmupTasks)
extends Record
Configuration properties for the netty-based virtual thread scheduler. These properties are
experimental and subject to change as the scheduler evolves, even in patch releases.
- Since:
- 4.9.0
- Author:
- Jonas Konrad
-
Constructor Summary
ConstructorsConstructorDescriptionLoomCarrierConfiguration(Duration timeSliceLatency, Duration timeSliceThroughput, Duration fifoSwitchTime, Duration taskFifoThreshold, Duration blockTime, int throughputModeThreshold, int workSpillThreshold, int normalWarmupTasks) Creates an instance of aLoomCarrierConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockTimerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefifoSwitchTimerecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thenormalWarmupTasksrecord component.Returns the value of thetaskFifoThresholdrecord component.intReturns the value of thethroughputModeThresholdrecord component.Returns the value of thetimeSliceLatencyrecord component.Returns the value of thetimeSliceThroughputrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theworkSpillThresholdrecord component.
-
Constructor Details
-
LoomCarrierConfiguration
public LoomCarrierConfiguration(@Bindable(defaultValue="500us") Duration timeSliceLatency, @Bindable(defaultValue="5ms") Duration timeSliceThroughput, @Bindable(defaultValue="1ms") Duration fifoSwitchTime, @Bindable(defaultValue="5ms") Duration taskFifoThreshold, @Bindable(defaultValue="1s") Duration blockTime, @Bindable(defaultValue="10") int throughputModeThreshold, @Bindable(defaultValue="2") int workSpillThreshold, @Bindable(defaultValue="100") int normalWarmupTasks) Creates an instance of aLoomCarrierConfigurationrecord class.- Parameters:
timeSliceLatency- the value for thetimeSliceLatencyrecord componenttimeSliceThroughput- the value for thetimeSliceThroughputrecord componentfifoSwitchTime- the value for thefifoSwitchTimerecord componenttaskFifoThreshold- the value for thetaskFifoThresholdrecord componentblockTime- the value for theblockTimerecord componentthroughputModeThreshold- the value for thethroughputModeThresholdrecord componentworkSpillThreshold- the value for theworkSpillThresholdrecord componentnormalWarmupTasks- the value for thenormalWarmupTasksrecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
timeSliceLatency
Returns the value of thetimeSliceLatencyrecord component.- Returns:
- the value of the
timeSliceLatencyrecord component
-
timeSliceThroughput
Returns the value of thetimeSliceThroughputrecord component.- Returns:
- the value of the
timeSliceThroughputrecord component
-
fifoSwitchTime
Returns the value of thefifoSwitchTimerecord component.- Returns:
- the value of the
fifoSwitchTimerecord component
-
taskFifoThreshold
Returns the value of thetaskFifoThresholdrecord component.- Returns:
- the value of the
taskFifoThresholdrecord component
-
blockTime
Returns the value of theblockTimerecord component.- Returns:
- the value of the
blockTimerecord component
-
throughputModeThreshold
Returns the value of thethroughputModeThresholdrecord component.- Returns:
- the value of the
throughputModeThresholdrecord component
-
workSpillThreshold
Returns the value of theworkSpillThresholdrecord component.- Returns:
- the value of the
workSpillThresholdrecord component
-
normalWarmupTasks
Returns the value of thenormalWarmupTasksrecord component.- Returns:
- the value of the
normalWarmupTasksrecord component
-