public enum AnyMatchingSlotMatchingStrategy extends Enum<AnyMatchingSlotMatchingStrategy> implements SlotMatchingStrategy
SlotMatchingStrategy which picks the first matching slot.| 枚举常量和说明 |
|---|
INSTANCE |
| 限定符和类型 | 方法和说明 |
|---|---|
<T extends TaskManagerSlotInformation> |
findMatchingSlot(ResourceProfile requestedProfile,
Collection<T> freeSlots,
java.util.function.Function<InstanceID,Integer> numberRegisteredSlotsLookup)
Finds a matching slot for the requested
ResourceProfile given the collection of free
slots and the total number of slots per TaskExecutor. |
static AnyMatchingSlotMatchingStrategy |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static AnyMatchingSlotMatchingStrategy[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final AnyMatchingSlotMatchingStrategy INSTANCE
public static AnyMatchingSlotMatchingStrategy[] values()
for (AnyMatchingSlotMatchingStrategy c : AnyMatchingSlotMatchingStrategy.values()) System.out.println(c);
public static AnyMatchingSlotMatchingStrategy valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public <T extends TaskManagerSlotInformation> Optional<T> findMatchingSlot(ResourceProfile requestedProfile, Collection<T> freeSlots, java.util.function.Function<InstanceID,Integer> numberRegisteredSlotsLookup)
SlotMatchingStrategyResourceProfile given the collection of free
slots and the total number of slots per TaskExecutor.findMatchingSlot 在接口中 SlotMatchingStrategyrequestedProfile - to find a matching slot forfreeSlots - collection of free slotsnumberRegisteredSlotsLookup - lookup for the number of registered slotsOptional.empty() if there is noneCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.