Interface SlotMatchingStrategy
-
- All Known Implementing Classes:
AnyMatchingSlotMatchingStrategy,LeastUtilizationSlotMatchingStrategy
public interface SlotMatchingStrategyStrategy how to find a matching slot.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends TaskManagerSlotInformation>
Optional<T>findMatchingSlot(ResourceProfile requestedProfile, Collection<T> freeSlots, java.util.function.Function<InstanceID,Integer> numberRegisteredSlotsLookup)Finds a matching slot for the requestedResourceProfilegiven the collection of free slots and the total number of slots per TaskExecutor.
-
-
-
Method Detail
-
findMatchingSlot
<T extends TaskManagerSlotInformation> Optional<T> findMatchingSlot(ResourceProfile requestedProfile, Collection<T> freeSlots, java.util.function.Function<InstanceID,Integer> numberRegisteredSlotsLookup)
Finds a matching slot for the requestedResourceProfilegiven the collection of free slots and the total number of slots per TaskExecutor.- Parameters:
requestedProfile- to find a matching slot forfreeSlots- collection of free slotsnumberRegisteredSlotsLookup- lookup for the number of registered slots- Returns:
- Returns a matching slots or
Optional.empty()if there is none
-
-