Enum PreferredAllocationRequestSlotMatchingStrategy
- java.lang.Object
-
- java.lang.Enum<PreferredAllocationRequestSlotMatchingStrategy>
-
- org.apache.flink.runtime.jobmaster.slotpool.PreferredAllocationRequestSlotMatchingStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<PreferredAllocationRequestSlotMatchingStrategy>
,RequestSlotMatchingStrategy
public enum PreferredAllocationRequestSlotMatchingStrategy extends Enum<PreferredAllocationRequestSlotMatchingStrategy> implements RequestSlotMatchingStrategy
RequestSlotMatchingStrategy
that takes the preferred allocations into account. The strategy will try to fulfill the preferred allocations and if this is not possible, then it will fall back toSimpleRequestSlotMatchingStrategy
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.jobmaster.slotpool.RequestSlotMatchingStrategy
RequestSlotMatchingStrategy.RequestSlotMatch
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<RequestSlotMatchingStrategy.RequestSlotMatch>
matchRequestsAndSlots(Collection<? extends PhysicalSlot> slots, Collection<org.apache.flink.runtime.jobmaster.slotpool.PendingRequest> pendingRequests)
Match the given slots with the given collection of pending requests.String
toString()
static PreferredAllocationRequestSlotMatchingStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static PreferredAllocationRequestSlotMatchingStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final PreferredAllocationRequestSlotMatchingStrategy INSTANCE
-
-
Method Detail
-
values
public static PreferredAllocationRequestSlotMatchingStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PreferredAllocationRequestSlotMatchingStrategy c : PreferredAllocationRequestSlotMatchingStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PreferredAllocationRequestSlotMatchingStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
matchRequestsAndSlots
public Collection<RequestSlotMatchingStrategy.RequestSlotMatch> matchRequestsAndSlots(Collection<? extends PhysicalSlot> slots, Collection<org.apache.flink.runtime.jobmaster.slotpool.PendingRequest> pendingRequests)
Description copied from interface:RequestSlotMatchingStrategy
Match the given slots with the given collection of pending requests.- Specified by:
matchRequestsAndSlots
in interfaceRequestSlotMatchingStrategy
- Parameters:
slots
- slots to matchpendingRequests
- slot requests to match- Returns:
- resulting matches of this operation
-
toString
public String toString()
- Overrides:
toString
in classEnum<PreferredAllocationRequestSlotMatchingStrategy>
-
-