Record Class ManagedInvocationSettings

java.lang.Object
java.lang.Record
org.j7m.middleware.application.components.ManagedInvocationSettings
Record Components:
maximumWorkers - maximum host workers executing serial invocation actors
maximumQueuedActors - maximum pending actors across all invocations
maximumTasksPerInvocation - maximum lifetime child and continuation admissions
maximumPendingPerInvocation - maximum pending tasks for one invocation

public record ManagedInvocationSettings(int maximumWorkers, int maximumQueuedActors, int maximumTasksPerInvocation, int maximumPendingPerInvocation) extends Record
Finite trusted host capacity for explicitly tracked invocation children and codec continuations. Threads expire while idle and carry the host class loader, never an application's class loader. Limits are admission bounds, not a promise of parallel CALL execution within one invocation.
  • Constructor Details

    • ManagedInvocationSettings

      public ManagedInvocationSettings(int maximumWorkers, int maximumQueuedActors, int maximumTasksPerInvocation, int maximumPendingPerInvocation)
      Validates finite positive capacities.
      Throws:
      IllegalArgumentException - for nonpositive, excessive or inconsistent capacities
  • Method Details

    • defaults

      public static ManagedInvocationSettings defaults()
      Returns the bounded development-qualified host profile.
      Returns:
      eight workers, 256 waiting actors and at most 1024 tasks/128 pending per invocation
    • newExecutor

      public ThreadPoolExecutor newExecutor()
      Creates a host-owned finite executor. Rejection never starts an unaccounted fallback thread. The owner may shut down this executor only after all retained invocations have drained.
      Returns:
      daemon executor with one-second idle expiry and explicit overload rejection
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • maximumWorkers

      public int maximumWorkers()
      Returns the value of the maximumWorkers record component.
      Returns:
      the value of the maximumWorkers record component
    • maximumQueuedActors

      public int maximumQueuedActors()
      Returns the value of the maximumQueuedActors record component.
      Returns:
      the value of the maximumQueuedActors record component
    • maximumTasksPerInvocation

      public int maximumTasksPerInvocation()
      Returns the value of the maximumTasksPerInvocation record component.
      Returns:
      the value of the maximumTasksPerInvocation record component
    • maximumPendingPerInvocation

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