public enum LocationPreferenceSlotSelectionStrategy extends Enum<LocationPreferenceSlotSelectionStrategy> implements SlotSelectionStrategy
SlotSelectionStrategy that is based on location preference hints.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 LocationPreferenceSlotSelectionStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LocationPreferenceSlotSelectionStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LocationPreferenceSlotSelectionStrategy INSTANCE
public static LocationPreferenceSlotSelectionStrategy[] values()
for (LocationPreferenceSlotSelectionStrategy c : LocationPreferenceSlotSelectionStrategy.values()) System.out.println(c);
public static LocationPreferenceSlotSelectionStrategy 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.