/** * @since GemFire 6.5 */ @Override public QueryService getQueryService(String poolName) { Pool pool = PoolManager.find(poolName); if (pool == null) { throw new IllegalStateException("Could not find a pool named " + poolName); } else { return pool.getQueryService(); } }
@Override public InternalQueryService getQueryService() { if (!isClient()) { return new DefaultQueryService(this); } Pool defaultPool = getDefaultPool(); if (defaultPool == null) { throw new IllegalStateException( "Client cache does not have a default pool. Use getQueryService(String poolName) instead."); } return (InternalQueryService) defaultPool.getQueryService(); }
@Override public QueryService getQueryService() { preOp(); if (this.proxyQueryService == null) { this.proxyQueryService = new ProxyQueryService(this, this.userAttributes.getPool().getQueryService()); } return this.proxyQueryService; }
protected void executeQueryWithCheckForAccessPermissions(VM vm, String query, String regionName, String regexForExpectedExceptions) { vm.invoke(() -> { Region region = getClientCache().getRegion(regionName); assertExceptionOccurred(getClientCache().getQueryService(), query, regexForExpectedExceptions); Pool pool = PoolManager.find(region); assertExceptionOccurred(pool.getQueryService(), query, regexForExpectedExceptions); }); } }
public static Pool mockQueryService(Pool pool) { QueryService mockQueryService = mockQueryService(); when(pool.getQueryService()).thenReturn(mockQueryService); return pool; }
public QueryService getQueryService(QueryService defaultQueryService) { return defaultIfNull(defaultQueryService, () -> getDelegate().getQueryService()); }
public QueryService getQueryService(QueryService defaultQueryService) { return defaultIfNull(defaultQueryService, () -> getDelegate().getQueryService()); }