Interface FreeSlotTracker
-
- All Known Implementing Classes:
DefaultFreeSlotTracker
public interface FreeSlotTrackerTrack all free slots.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FreeSlotTrackercreateNewFreeSlotTrackerWithoutBlockedSlots(Set<AllocationID> blockedSlots)Create a new free slot tracker without blocked slots.Set<AllocationID>getAvailableSlots()Get allocation id of all available slots.Collection<PhysicalSlot>getFreeSlotsInformation()Returns a list ofPhysicalSlotobjects about all slots that are currently available in the slot pool.Collection<AllocatedSlotPool.FreeSlotInfo>getFreeSlotsWithIdleSinceInformation()Returns a list ofAllocatedSlotPool.FreeSlotInfoobjects about all slots with slot idle since that are currently available in the slot pool.SlotInfogetSlotInfo(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 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
-
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
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
-
-