Record Class Config.Executor

java.lang.Object
java.lang.Record
net.flectone.pulse.config.Config.Executor
Enclosing class:
Config

public static record Config.Executor(Integer minPoolSize, Integer maxPoolSize, Boolean allowCoreThreadTimeout, Config.Executor.WorkQueue workQueue, Config.Executor.DurationUnit keepAlive, Config.Executor.DurationUnit shutdownTimeout, Config.Executor.DurationUnit stallTimeout) extends Record
Since:
1.7.1
  • Constructor Details

    • Executor

      public Executor(Integer minPoolSize, Integer maxPoolSize, Boolean allowCoreThreadTimeout, Config.Executor.WorkQueue workQueue, Config.Executor.DurationUnit keepAlive, Config.Executor.DurationUnit shutdownTimeout, Config.Executor.DurationUnit stallTimeout)
      Creates an instance of a Executor record class.
      Parameters:
      minPoolSize - the value for the minPoolSize record component
      maxPoolSize - the value for the maxPoolSize record component
      allowCoreThreadTimeout - the value for the allowCoreThreadTimeout record component
      workQueue - the value for the workQueue record component
      keepAlive - the value for the keepAlive record component
      shutdownTimeout - the value for the shutdownTimeout record component
      stallTimeout - the value for the stallTimeout record component
  • Method Details

    • builder

      public static Config.Executor.ExecutorBuilder builder()
    • toBuilder

      public Config.Executor.ExecutorBuilder toBuilder()
    • withMinPoolSize

      public Config.Executor withMinPoolSize(Integer minPoolSize)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withMaxPoolSize

      public Config.Executor withMaxPoolSize(Integer maxPoolSize)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withAllowCoreThreadTimeout

      public Config.Executor withAllowCoreThreadTimeout(Boolean allowCoreThreadTimeout)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withWorkQueue

      public Config.Executor withWorkQueue(Config.Executor.WorkQueue workQueue)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withKeepAlive

      public Config.Executor withKeepAlive(Config.Executor.DurationUnit keepAlive)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withShutdownTimeout

      public Config.Executor withShutdownTimeout(Config.Executor.DurationUnit shutdownTimeout)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withStallTimeout

      public Config.Executor withStallTimeout(Config.Executor.DurationUnit stallTimeout)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • 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 Objects::equals(Object,Object).
      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.
    • minPoolSize

      public Integer minPoolSize()
      Returns the value of the minPoolSize record component.
      Returns:
      the value of the minPoolSize record component
    • maxPoolSize

      public Integer maxPoolSize()
      Returns the value of the maxPoolSize record component.
      Returns:
      the value of the maxPoolSize record component
    • allowCoreThreadTimeout

      public Boolean allowCoreThreadTimeout()
      Returns the value of the allowCoreThreadTimeout record component.
      Returns:
      the value of the allowCoreThreadTimeout record component
    • workQueue

      public Config.Executor.WorkQueue workQueue()
      Returns the value of the workQueue record component.
      Returns:
      the value of the workQueue record component
    • keepAlive

      public Config.Executor.DurationUnit keepAlive()
      Returns the value of the keepAlive record component.
      Returns:
      the value of the keepAlive record component
    • shutdownTimeout

      public Config.Executor.DurationUnit shutdownTimeout()
      Returns the value of the shutdownTimeout record component.
      Returns:
      the value of the shutdownTimeout record component
    • stallTimeout

      public Config.Executor.DurationUnit stallTimeout()
      Returns the value of the stallTimeout record component.
      Returns:
      the value of the stallTimeout record component