Package io.temporal.internal.worker
Class TrackingSlotSupplier<SI extends SlotInfo>
- java.lang.Object
-
- io.temporal.internal.worker.TrackingSlotSupplier<SI>
-
- Type Parameters:
SI- The slot info type
public class TrackingSlotSupplier<SI extends SlotInfo> extends java.lang.ObjectWraps a slot supplier and supplements it with additional tracking information that is useful to provide to all implementations. This type is used internally rather thanSlotSupplierdirectly.
-
-
Constructor Summary
Constructors Constructor Description TrackingSlotSupplier(SlotSupplier<SI> inner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachMetricsToResourceController(com.uber.m3.tally.Scope metricsScope)If any slot supplier is resource-based, we want to attach a metrics scope to the controller (before it's labelled with the worker type).intgetIssuedSlots()voidmarkSlotUsed(SI slotInfo, SlotPermit permit)intmaximumSlots()voidreleaseSlot(SlotReleaseReason reason, SlotPermit permit)SlotPermitreserveSlot(SlotReservationData dat)voidsetMetricsScope(com.uber.m3.tally.Scope metricsScope)java.util.Optional<SlotPermit>tryReserveSlot(SlotReservationData dat)
-
-
-
Constructor Detail
-
TrackingSlotSupplier
public TrackingSlotSupplier(SlotSupplier<SI> inner)
-
-
Method Detail
-
reserveSlot
public SlotPermit reserveSlot(SlotReservationData dat) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
tryReserveSlot
public java.util.Optional<SlotPermit> tryReserveSlot(SlotReservationData dat)
-
markSlotUsed
public void markSlotUsed(SI slotInfo, SlotPermit permit)
-
releaseSlot
public void releaseSlot(SlotReleaseReason reason, SlotPermit permit)
-
maximumSlots
public int maximumSlots()
-
getIssuedSlots
public int getIssuedSlots()
-
setMetricsScope
public void setMetricsScope(com.uber.m3.tally.Scope metricsScope)
-
attachMetricsToResourceController
public void attachMetricsToResourceController(com.uber.m3.tally.Scope metricsScope)
If any slot supplier is resource-based, we want to attach a metrics scope to the controller (before it's labelled with the worker type).
-
-