Class TrackingSlotSupplier<SI extends SlotInfo>

  • Type Parameters:
    SI - The slot info type

    public class TrackingSlotSupplier<SI extends SlotInfo>
    extends java.lang.Object
    Wraps a slot supplier and supplements it with additional tracking information that is useful to provide to all implementations. This type is used internally rather than SlotSupplier directly.
    • Constructor Detail

      • TrackingSlotSupplier

        public TrackingSlotSupplier​(SlotSupplier<SI> inner)
    • Method Detail

      • reserveSlot

        public SlotPermit reserveSlot​(SlotReservationData dat)
                               throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • markSlotUsed

        public void markSlotUsed​(SI slotInfo,
                                 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).