Interface FreeSlotInfoTracker
-
- All Known Implementing Classes:
DefaultFreeSlotInfoTracker
public interface FreeSlotInfoTrackerTrack all free slots, support bookkeeping slot forSlotSelectionStrategy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FreeSlotInfoTrackercreateNewFreeSlotInfoTrackerWithoutBlockedSlots(Set<AllocationID> blockedSlots)Create a new free slot tracker without blocked slots.Set<AllocationID>getAvailableSlots()Get allocation id of all available slots.Collection<SlotInfo>getFreeSlotsInformation()Returns a list ofSlotInfoobjects 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<SlotInfo> getFreeSlotsInformation()
Returns a list ofSlotInfoobjects about all slots that are currently available in the slot pool.- Returns:
- a list of
SlotInfoobjects 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
-
createNewFreeSlotInfoTrackerWithoutBlockedSlots
FreeSlotInfoTracker createNewFreeSlotInfoTrackerWithoutBlockedSlots(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
-
-