public enum PreviousAllocationSlotSelectionStrategy extends Enum<PreviousAllocationSlotSelectionStrategy> implements SlotSelectionStrategy
SlotSelectionStrategy that is based on previous allocations and
falls back to using location preference hints if there is no previous allocation.SlotSelectionStrategy.SlotInfoAndLocality| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
Optional<SlotSelectionStrategy.SlotInfoAndLocality> |
selectBestSlotForProfile(Collection<? extends SlotInfo> availableSlots,
SlotProfile slotProfile)
Selects the best
SlotInfo w.r.t. |
static PreviousAllocationSlotSelectionStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PreviousAllocationSlotSelectionStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PreviousAllocationSlotSelectionStrategy INSTANCE
public static PreviousAllocationSlotSelectionStrategy[] values()
for (PreviousAllocationSlotSelectionStrategy c : PreviousAllocationSlotSelectionStrategy.values()) System.out.println(c);
public static PreviousAllocationSlotSelectionStrategy 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 Optional<SlotSelectionStrategy.SlotInfoAndLocality> selectBestSlotForProfile(@Nonnull Collection<? extends SlotInfo> availableSlots, @Nonnull SlotProfile slotProfile)
SlotSelectionStrategySlotInfo w.r.t. a certain selection criterion from the provided list of available slots
and considering the given SlotProfile that describes the requirements.selectBestSlotForProfile in interface SlotSelectionStrategyavailableSlots - a list of the available slots to select from.slotProfile - a slot profile, describing requirements for the slot selection.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.