Interface FreeSlotTracker

  • All Known Implementing Classes:
    DefaultFreeSlotTracker

    public interface FreeSlotTracker
    Track all free slots.
    • Method Detail

      • getAvailableSlots

        Set<AllocationID> getAvailableSlots()
        Get allocation id of all available slots.
        Returns:
        allocation id of available slots
      • getSlotInfo

        SlotInfo getSlotInfo​(AllocationID allocationId)
        Get slot info by allocation id, this slot must exist.
        Parameters:
        allocationId - to get SlotInfo
        Returns:
        slot info for the allocation id
      • getFreeSlotsInformation

        Collection<PhysicalSlot> getFreeSlotsInformation()
        Returns a list of PhysicalSlot objects about all slots that are currently available in the slot pool.
        Returns:
        a list of PhysicalSlot objects about all slots that are currently available in the slot pool.
      • getTaskExecutorUtilization

        double getTaskExecutorUtilization​(SlotInfo slotInfo)
        Get task executor utilization of this slot.
        Parameters:
        slotInfo - to get task executor utilization
        Returns:
        task executor utilization of this slot
      • reserveSlot

        void reserveSlot​(AllocationID allocationId)
        Reserve free slot when it is used.
        Parameters:
        allocationId - to reserve
      • createNewFreeSlotTrackerWithoutBlockedSlots

        FreeSlotTracker createNewFreeSlotTrackerWithoutBlockedSlots​(Set<AllocationID> blockedSlots)
        Create a new free slot tracker without blocked slots.
        Parameters:
        blockedSlots - slots that should not be used
        Returns:
        the new free slot tracker