Record Class EngineOptions
java.lang.Object
java.lang.Record
com.iantapply.orchestra.engine.EngineOptions
- Record Components:
workerCount- maximum concurrent execution workersqueueCapacity- maximum pending execution taskspollInterval- delay between durable-work scanspollBatchSize- maximum executions loaded by one scanleaseDuration- renewable execution lease lifetimeshutdownTimeout- graceful worker shutdown allowance
-
Constructor Summary
ConstructorsConstructorDescriptionEngineOptions(int workerCount, int queueCapacity, Duration pollInterval, int pollBatchSize, Duration leaseDuration, Duration shutdownTimeout) Validates that every capacity and duration is positive. -
Method Summary
Modifier and TypeMethodDescriptionstatic EngineOptionsdefaults(int workerCount, int queueCapacity) Returns production defaults with the supplied worker and queue bounds.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theleaseDurationrecord component.intReturns the value of thepollBatchSizerecord component.Returns the value of thepollIntervalrecord component.intReturns the value of thequeueCapacityrecord component.Returns the value of theshutdownTimeoutrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theworkerCountrecord component.
-
Constructor Details
-
EngineOptions
-
-
Method Details
-
defaults
Returns production defaults with the supplied worker and queue bounds.- Parameters:
workerCount- maximum concurrent workersqueueCapacity- maximum pending tasks- Returns:
- validated production defaults
-
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. -
workerCount
public int workerCount()Returns the value of theworkerCountrecord component.- Returns:
- the value of the
workerCountrecord component
-
queueCapacity
public int queueCapacity()Returns the value of thequeueCapacityrecord component.- Returns:
- the value of the
queueCapacityrecord component
-
pollInterval
Returns the value of thepollIntervalrecord component.- Returns:
- the value of the
pollIntervalrecord component
-
pollBatchSize
public int pollBatchSize()Returns the value of thepollBatchSizerecord component.- Returns:
- the value of the
pollBatchSizerecord component
-
leaseDuration
Returns the value of theleaseDurationrecord component.- Returns:
- the value of the
leaseDurationrecord component
-
shutdownTimeout
Returns the value of theshutdownTimeoutrecord component.- Returns:
- the value of the
shutdownTimeoutrecord component
-