Interface FreeSlotTracker

All Known Implementing Classes:
DefaultFreeSlotTracker

public interface FreeSlotTracker
Track all free slots.
  • Method Details

    • 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
    • getFreeSlotsWithIdleSinceInformation

      Collection<AllocatedSlotPool.FreeSlotInfo> getFreeSlotsWithIdleSinceInformation()
      Returns a list of AllocatedSlotPool.FreeSlotInfo objects about all slots with slot idle since that are currently available in the slot pool.
      Returns:
      a list of AllocatedSlotPool.FreeSlotInfo objects about all slots with slot idle since that are currently available in the slot pool.
    • 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