@Override public boolean isBackingCacheAvailable() { if (getSessionManager().isCommitValveFailfastEnabled()) { PoolImpl pool = (PoolImpl) PoolManager.find(getOperatingRegionName()); return pool.isPrimaryUpdaterAlive(); } return true; }
@SuppressWarnings("all") private void verifyClientCacheSubscriptionQueueConnectionsEstablished() { resolvePools().stream() .filter(pool -> pool.getSubscriptionEnabled()) .filter(pool -> pool instanceof PoolImpl) .map(pool -> (PoolImpl) pool) .forEach(pool -> { long timeout = System.currentTimeMillis() + resolveTimeout(); while (System.currentTimeMillis() < timeout && !pool.isPrimaryUpdaterAlive()) { synchronized (pool) { ObjectUtils.doOperationSafely(() -> { TimeUnit.MILLISECONDS.timedWait(pool, 500L); return null; }); } } String errorMessage = String.format("ClientCache subscription queue connection not established;" + " Pool [%s] has configuration [locators = %s, servers = %s]", pool, pool.getLocators(), pool.getServers()); if (isThrowExceptionOnSubscriptionQueueConnectionFailure()) { Assert.state(pool.isPrimaryUpdaterAlive(), errorMessage); } else if (getLogger().isWarnEnabled()){ getLogger().warn(errorMessage); } }); }
@Override public boolean isBackingCacheAvailable() { if (getSessionManager().isCommitValveFailfastEnabled()) { PoolImpl pool = (PoolImpl) PoolManager.find(getOperatingRegionName()); return pool.isPrimaryUpdaterAlive(); } return true; }