Class ResourceBasedTuner
java.lang.Object
io.temporal.worker.tuning.ResourceBasedTuner
- All Implemented Interfaces:
WorkerTuner
A
WorkerTuner that attempts to allocate slots based on available system resources.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceBasedSlotOptionsstatic final ResourceBasedSlotOptionsstatic final ResourceBasedSlotOptions -
Constructor Summary
ConstructorsConstructorDescriptionResourceBasedTuner(ResourceBasedControllerOptions controllerOptions, ResourceBasedSlotOptions workflowSlotOptions, ResourceBasedSlotOptions activitySlotOptions, ResourceBasedSlotOptions localActivitySlotOptions, ResourceBasedSlotOptions nexusSlotOptions, ScheduledExecutorService executor) -
Method Summary
-
Field Details
-
DEFAULT_WORKFLOW_SLOT_OPTIONS
-
DEFAULT_ACTIVITY_SLOT_OPTIONS
-
DEFAULT_NEXUS_SLOT_OPTIONS
-
-
Constructor Details
-
ResourceBasedTuner
public ResourceBasedTuner(ResourceBasedControllerOptions controllerOptions, ResourceBasedSlotOptions workflowSlotOptions, ResourceBasedSlotOptions activitySlotOptions, ResourceBasedSlotOptions localActivitySlotOptions, ResourceBasedSlotOptions nexusSlotOptions, ScheduledExecutorService executor) - Parameters:
controllerOptions- options for theResourceBasedControllerused by this tuner
-
-
Method Details
-
newBuilder
-
getWorkflowTaskSlotSupplier
- Specified by:
getWorkflowTaskSlotSupplierin interfaceWorkerTuner- Returns:
- A
SlotSupplierfor workflow tasks.
-
getActivityTaskSlotSupplier
- Specified by:
getActivityTaskSlotSupplierin interfaceWorkerTuner- Returns:
- A
SlotSupplierfor activity tasks.
-
getLocalActivitySlotSupplier
- Specified by:
getLocalActivitySlotSupplierin interfaceWorkerTuner- Returns:
- A
SlotSupplierfor local activities.
-
getNexusSlotSupplier
- Specified by:
getNexusSlotSupplierin interfaceWorkerTuner- Returns:
- A
SlotSupplierfor nexus tasks.
-