Record Class ManagedResourcePolicy.ResourceProfile
java.lang.Object
java.lang.Record
org.j7m.middleware.application.components.ManagedResourcePolicy.ResourceProfile
- Record Components:
capacity- simultaneous managed method executions, 1..1000000maximumQueued- waiting callers, 0..1024maximumWait- bounded queue wait, zero..one minuteageingStep- positive priority ageing interval, at most one daymaximumPriority- highest application-declared priority allowed, -1024..1024
- Enclosing class:
ManagedResourcePolicy
-
Constructor Summary
ConstructorsConstructorDescriptionResourceProfile(int capacity, int maximumQueued, Duration maximumWait, Duration ageingStep, int maximumPriority) Validates finite enforced admission bounds. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theageingSteprecord component.intcapacity()Returns the value of thecapacityrecord component.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 themaximumPriorityrecord component.intReturns the value of themaximumQueuedrecord component.Returns the value of themaximumWaitrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourceProfile
public ResourceProfile(int capacity, int maximumQueued, Duration maximumWait, Duration ageingStep, int maximumPriority) Validates finite enforced admission bounds.- Throws:
IllegalArgumentException- for invalid boundsNullPointerException- if either interval is null
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
capacity
-
maximumQueued
public int maximumQueued()Returns the value of themaximumQueuedrecord component.- Returns:
- the value of the
maximumQueuedrecord component
-
maximumWait
Returns the value of themaximumWaitrecord component.- Returns:
- the value of the
maximumWaitrecord component
-
ageingStep
Returns the value of theageingSteprecord component.- Returns:
- the value of the
ageingSteprecord component
-
maximumPriority
public int maximumPriority()Returns the value of themaximumPriorityrecord component.- Returns:
- the value of the
maximumPriorityrecord component
-