public interface SchedulingStrategy
SlotProfile
that produced the matcher object. A matching candidate is transformed into a
desired result. If the matcher does not find a matching candidate, it returns null.Modifier and Type | Method and Description |
---|---|
<IN,OUT> OUT |
findMatchWithLocality(SlotProfile slotProfile,
java.util.stream.Stream<IN> candidates,
java.util.function.Function<IN,SlotContext> contextExtractor,
java.util.function.Predicate<IN> additionalRequirementsFilter,
java.util.function.BiFunction<IN,Locality,OUT> resultProducer)
This method takes the candidate slots, extracts slot contexts from them, filters them by the profile
requirements and potentially by additional requirements, and produces a result from a match.
|
@Nullable <IN,OUT> OUT findMatchWithLocality(@Nonnull SlotProfile slotProfile, @Nonnull java.util.stream.Stream<IN> candidates, @Nonnull java.util.function.Function<IN,SlotContext> contextExtractor, @Nonnull java.util.function.Predicate<IN> additionalRequirementsFilter, @Nonnull java.util.function.BiFunction<IN,Locality,OUT> resultProducer)
IN
- type of the objects against we match the profile.OUT
- type of the produced output from a matching object.slotProfile
- slotProfile for which to find a matching slotcandidates
- stream of candidates to match against.contextExtractor
- function to extract the SlotContext
from the candidates.additionalRequirementsFilter
- predicate to specify additional requirements for each candidate.resultProducer
- function to produce a result from a matching candidate input.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.