Package io.temporal.worker.tuning
Class ResourceBasedController
- java.lang.Object
-
- io.temporal.worker.tuning.ResourceBasedController
-
public class ResourceBasedController extends java.lang.Object
Is used byResourceBasedSlotSupplier
andResourceBasedTuner
to make decisions about whether slots should be handed out based on system resource usage.
-
-
Field Summary
Fields Modifier and Type Field Description ResourceBasedControllerOptions
options
-
Constructor Summary
Constructors Constructor Description ResourceBasedController(ResourceBasedControllerOptions options, SystemResourceInfo systemInfoSupplier)
Construct a controller with the given options and system info supplier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResourceBasedController
newSystemInfoController(ResourceBasedControllerOptions options)
Construct a controller with the given options.void
setMetricsScope(com.uber.m3.tally.Scope metricsScope)
Visible for internal usage.
-
-
-
Field Detail
-
options
public final ResourceBasedControllerOptions options
-
-
Constructor Detail
-
ResourceBasedController
public ResourceBasedController(ResourceBasedControllerOptions options, SystemResourceInfo systemInfoSupplier)
Construct a controller with the given options and system info supplier. Users should prefernewSystemInfoController(ResourceBasedControllerOptions)
.
-
-
Method Detail
-
newSystemInfoController
public static ResourceBasedController newSystemInfoController(ResourceBasedControllerOptions options)
Construct a controller with the given options. If you want to use resource-based tuning for all slot suppliers, preferResourceBasedTuner
.
-
setMetricsScope
public void setMetricsScope(com.uber.m3.tally.Scope metricsScope)
Visible for internal usage. Can only be set once.
-
-