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, com.uber.m3.tally.Scope metricsScope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetIssuedSlots()voidmarkSlotUsed(SI slotInfo, SlotPermit permit)java.util.Optional<java.lang.Integer>maximumSlots()voidreleaseSlot(SlotReleaseReason reason, SlotPermit permit)SlotPermitreserveSlot(SlotReservationData dat)java.util.Optional<SlotPermit>tryReserveSlot(SlotReservationData dat)
-
-
-
Constructor Detail
-
TrackingSlotSupplier
public TrackingSlotSupplier(SlotSupplier<SI> inner, com.uber.m3.tally.Scope metricsScope)
-
-
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 java.util.Optional<java.lang.Integer> maximumSlots()
-
getIssuedSlots
public int getIssuedSlots()
-
-