@Override public void run() { PoolImpl bpi = proxy; if (bpi != null) { try { bpi.destroy(); } catch (Exception e) {/* ignore */ } } } };
@Override public void destroy() { destroy(false); }
/** * @since GemFire 5.7 */ protected void finishCreate(PoolManagerImpl pm) { pm.register(this); try { start(); } catch (RuntimeException e) { try { destroy(false); } catch (RuntimeException ignore) { // do nothing } throw e; } }
/** * Test two regions: notify by subscription is true. Both the regions have registered interest in * all the keys. Close both the regions. When the last region is closed , it should close the * ConnectionProxy on the client , close all the server connection threads on the server & remove * the CacheClientProxy from the CacheClient notifier */ @Test public void testRegionClose() throws Exception { // start server first PORT1 = initServerCache(true); pool = (PoolImpl) createClientCache(NetworkUtils.getServerHostName(), PORT1); populateCache(); registerInterestInBothTheRegions(); closeBothRegions(); assertFalse(pool.isDestroyed()); pool.destroy(); assertTrue(pool.isDestroyed()); server1.invoke(() -> ClientServerMiscDUnitTestBase.verifyNoCacheClientProxyOnServer()); }
destroyPRRegion(); assertFalse(pool.isDestroyed()); pool.destroy(); assertTrue(pool.isDestroyed());