docs: public static QueryFactory getQueryFactory(Cache<?, ?> cache) {
        if (cache == null || cache.getAdvancedCache() == null) {
           throw new IllegalArgumentException("cache parameter shall not be null");
        }
        AdvancedCache<?, ?> advancedCache = cache.getAdvancedCache();
        ensureAccessPermissions(advancedCache);
        EmbeddedQueryEngine queryEngine = SecurityActions.getCacheComponentRegistry(advancedCache).getComponent(EmbeddedQueryEngine.class);
        if (queryEngine == null) {
           throw log.queryModuleNotInitialised();
        }
        return new EmbeddedQueryFactory(queryEngine);
     }