Record Class ConfiguredExecutorProvider.PoolSizes

java.lang.Object
java.lang.Record
de.aristaflow.adept2.base.service.ConfiguredExecutorProvider.PoolSizes
Record Components:
corePoolSize - The number of threads the pool keeps even when they are idle.
maxPoolSize - The maximum number of threads of the pool.
Enclosing class:
ConfiguredExecutorProvider

public static record ConfiguredExecutorProvider.PoolSizes(int corePoolSize, int maxPoolSize) extends Record
The sizes of a pool: the number of threads it keeps even when they are idle and the maximum number of its threads. A scheduled pool keeps the former as its fixed number of threads, the maximum not applying to it. A providing service states them as the defaults of a pool it names, which apply where the configuration of that pool states no size and replace the generic defaults for that pool only.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PoolSizes(int corePoolSize, int maxPoolSize)
    Creates an instance of a PoolSizes record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the corePoolSize record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the maxPoolSize record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PoolSizes

      public PoolSizes(int corePoolSize, int maxPoolSize)
      Creates an instance of a PoolSizes record class.
      Parameters:
      corePoolSize - the value for the corePoolSize record component
      maxPoolSize - the value for the maxPoolSize 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. All components in this record class 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.
    • corePoolSize

      public int corePoolSize()
      Returns the value of the corePoolSize record component.
      Returns:
      the value of the corePoolSize record component
    • maxPoolSize

      public int maxPoolSize()
      Returns the value of the maxPoolSize record component.
      Returns:
      the value of the maxPoolSize record component