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
  • 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 a LoomCarrierConfiguration record class.
      Parameters:
      timeSliceLatency - the value for the timeSliceLatency record component
      timeSliceThroughput - the value for the timeSliceThroughput record component
      fifoSwitchTime - the value for the fifoSwitchTime record component
      taskFifoThreshold - the value for the taskFifoThreshold record component
      blockTime - the value for the blockTime record component
      throughputModeThreshold - the value for the throughputModeThreshold record component
      workSpillThreshold - the value for the workSpillThreshold record component
      normalWarmupTasks - the value for the normalWarmupTasks record component
  • Method Details

    • 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 '=='.
      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.
    • timeSliceLatency

      @Bindable(defaultValue="500us") public Duration timeSliceLatency()
      Returns the value of the timeSliceLatency record component.
      Returns:
      the value of the timeSliceLatency record component
    • timeSliceThroughput

      @Bindable(defaultValue="5ms") public Duration timeSliceThroughput()
      Returns the value of the timeSliceThroughput record component.
      Returns:
      the value of the timeSliceThroughput record component
    • fifoSwitchTime

      @Bindable(defaultValue="1ms") public Duration fifoSwitchTime()
      Returns the value of the fifoSwitchTime record component.
      Returns:
      the value of the fifoSwitchTime record component
    • taskFifoThreshold

      @Bindable(defaultValue="5ms") public Duration taskFifoThreshold()
      Returns the value of the taskFifoThreshold record component.
      Returns:
      the value of the taskFifoThreshold record component
    • blockTime

      @Bindable(defaultValue="1s") public Duration blockTime()
      Returns the value of the blockTime record component.
      Returns:
      the value of the blockTime record component
    • throughputModeThreshold

      @Bindable(defaultValue="10") public int throughputModeThreshold()
      Returns the value of the throughputModeThreshold record component.
      Returns:
      the value of the throughputModeThreshold record component
    • workSpillThreshold

      @Bindable(defaultValue="2") public int workSpillThreshold()
      Returns the value of the workSpillThreshold record component.
      Returns:
      the value of the workSpillThreshold record component
    • normalWarmupTasks

      @Bindable(defaultValue="100") public int normalWarmupTasks()
      Returns the value of the normalWarmupTasks record component.
      Returns:
      the value of the normalWarmupTasks record component