presto-resource-group-managers/src/main/java/io/prestosql/plugin/resourcegroups/FileResourceGroupConfigurationManager.java/FileResourceGroupConfigurationManager/match
class FileResourceGroupConfigurationManager:    @Override
    public Optional<SelectionContext<ResourceGroupIdTemplate>> match(SelectionCriteria criteria)
    {
        return selectors.stream()
                .map(s -> s.match(criteria))
                .filter(Optional::isPresent)
                .map(Optional::get)
                .findFirst();
    }