Interface FreeSlotTracker
- All Known Implementing Classes:
DefaultFreeSlotTracker
public interface FreeSlotTracker
Track all free slots.
-
Method Summary
Modifier and TypeMethodDescriptioncreateNewFreeSlotTrackerWithoutBlockedSlots(Set<AllocationID> blockedSlots) Create a new free slot tracker without blocked slots.Get allocation id of all available slots.Returns a list ofPhysicalSlotobjects about all slots that are currently available in the slot pool.Returns a list ofAllocatedSlotPool.FreeSlotInfoobjects about all slots with slot idle since that are currently available in the slot pool.getSlotInfo(AllocationID allocationId) Get slot info by allocation id, this slot must exist.doublegetTaskExecutorUtilization(SlotInfo slotInfo) Get task executor utilization of this slot.voidreserveSlot(AllocationID allocationId) Reserve free slot when it is used.
-
Method Details
-
getAvailableSlots
Set<AllocationID> getAvailableSlots()Get allocation id of all available slots.- Returns:
- allocation id of available slots
-
getSlotInfo
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 ofAllocatedSlotPool.FreeSlotInfoobjects about all slots with slot idle since that are currently available in the slot pool.- Returns:
- a list of
AllocatedSlotPool.FreeSlotInfoobjects about all slots with slot idle since that are currently available in the slot pool.
-
getFreeSlotsInformation
Collection<PhysicalSlot> getFreeSlotsInformation()Returns a list ofPhysicalSlotobjects about all slots that are currently available in the slot pool.- Returns:
- a list of
PhysicalSlotobjects about all slots that are currently available in the slot pool.
-
getTaskExecutorUtilization
Get task executor utilization of this slot.- Parameters:
slotInfo- to get task executor utilization- Returns:
- task executor utilization of this slot
-
reserveSlot
Reserve free slot when it is used.- Parameters:
allocationId- to reserve
-
createNewFreeSlotTrackerWithoutBlockedSlots
Create a new free slot tracker without blocked slots.- Parameters:
blockedSlots- slots that should not be used- Returns:
- the new free slot tracker
-