public static SearchManager getSearchManager(Cache<?, ?> cache) {
if (cache == null || cache.getAdvancedCache() == null) {
throw new IllegalArgumentException("cache parameter shall not be null");
}
ensureAccessPermissions(cache.getAdvancedCache());
return new SearchManagerImpl(cache.getAdvancedCache());
}