public enum AnyMatchingSlotMatchingStrategy extends Enum<AnyMatchingSlotMatchingStrategy> implements SlotMatchingStrategy
SlotMatchingStrategy which picks the first matching slot.| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
<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)
Returns the enum constant of this type with the specified name.
|
static AnyMatchingSlotMatchingStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
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 - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic <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 in interface SlotMatchingStrategyrequestedProfile - to find a matching slot forfreeSlots - collection of free slotsnumberRegisteredSlotsLookup - lookup for the number of registered slotsOptional.empty() if there is noneCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.