Record Class ManagedInvocationSettings
java.lang.Object
java.lang.Record
org.j7m.middleware.application.components.ManagedInvocationSettings
- Record Components:
maximumWorkers- maximum host workers executing serial invocation actorsmaximumQueuedActors- maximum pending actors across all invocationsmaximumTasksPerInvocation- maximum lifetime child and continuation admissionsmaximumPendingPerInvocation- 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 Summary
ConstructorsConstructorDescriptionManagedInvocationSettings(int maximumWorkers, int maximumQueuedActors, int maximumTasksPerInvocation, int maximumPendingPerInvocation) Validates finite positive capacities. -
Method Summary
Modifier and TypeMethodDescriptionstatic ManagedInvocationSettingsdefaults()Returns the bounded development-qualified host profile.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaximumPendingPerInvocationrecord component.intReturns the value of themaximumQueuedActorsrecord component.intReturns the value of themaximumTasksPerInvocationrecord component.intReturns the value of themaximumWorkersrecord component.Creates a host-owned finite executor.final StringtoString()Returns a string representation of this record class.
-
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
Returns the bounded development-qualified host profile.- Returns:
- eight workers, 256 waiting actors and at most 1024 tasks/128 pending per invocation
-
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
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
maximumWorkers
public int maximumWorkers()Returns the value of themaximumWorkersrecord component.- Returns:
- the value of the
maximumWorkersrecord component
-
maximumQueuedActors
public int maximumQueuedActors()Returns the value of themaximumQueuedActorsrecord component.- Returns:
- the value of the
maximumQueuedActorsrecord component
-
maximumTasksPerInvocation
public int maximumTasksPerInvocation()Returns the value of themaximumTasksPerInvocationrecord component.- Returns:
- the value of the
maximumTasksPerInvocationrecord component
-
maximumPendingPerInvocation
public int maximumPendingPerInvocation()Returns the value of themaximumPendingPerInvocationrecord component.- Returns:
- the value of the
maximumPendingPerInvocationrecord component
-