20 lines
821 B
Java
20 lines
821 B
Java
package dev.ltms.bridged.placement;
|
|
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
import java.util.function.Function;
|
|
|
|
/**
|
|
* Everything a {@link PlacementPolicy} needs to make one selection.
|
|
*
|
|
* @param defaultProfile profile a {@code fixed} policy should return (may be {@code null})
|
|
* @param candidates every configured candidate; the policy filters out those at cap or unreachable
|
|
* @param liveCount current live worker count per profile (from the session registry)
|
|
* @param unreachable profiles already known to have failed in this spawn attempt
|
|
*/
|
|
public record PlacementContext(String defaultProfile,
|
|
List<PlacementCandidate> candidates,
|
|
Function<String, Integer> liveCount,
|
|
Set<String> unreachable) {
|
|
}
|