private boolean initializeProxy(CacheClientProxy l_proxy) throws IOException, CacheException { boolean status = false; if (!this.isProxyInInitializationMode(l_proxy)){ if (logger.isDebugEnabled()) { logger.debug("Initializing proxy: {}", l_proxy); } try { // Add client proxy to initialization list. This has to be done before // the queue is created so that events can be buffered here for delivery // to the queue once it's initialized (bug #41681 and others) addClientInitProxy(l_proxy); l_proxy.initializeMessageDispatcher(); // Initialization success. Add to client proxy list. addClientProxy(l_proxy); return true; } catch (RegionExistsException ree) { if (logger.isDebugEnabled()) { String name = ree.getRegion() != null ? ree.getRegion().getFullPath() : "null region"; logger.debug("Found RegionExistsException while initializing proxy. Region name: {}", name); } // This will return false; } finally { removeClientInitProxy(l_proxy); } } return status; }
/** * Adds a new <code>CacheClientProxy</code> to the list of known client * proxies * * @param proxy * The <code>CacheClientProxy</code> to add */ protected void addClientProxy(CacheClientProxy proxy) throws IOException { // this._logger.info(LocalizedStrings.DEBUG, "adding client proxy " + proxy); getCache(); // ensure cache reference is up to date so firstclient state is correct this._clientProxies.put(proxy.getProxyID(), proxy); // Remove this proxy from the init proxy list. removeClientInitProxy(proxy); this._connectionListener.queueAdded(proxy.getProxyID()); if (!(proxy.clientConflation == HandShake.CONFLATION_ON)) { // Delta not supported with conflation ON ClientHealthMonitor chm = ClientHealthMonitor.getInstance(); /* * #41788 - If the client connection init starts while cache/member is * shutting down, ClientHealthMonitor.getInstance() might return null. */ if (chm != null) { chm.numOfClientsPerVersion.incrementAndGet(proxy.getVersion().ordinal()); } } this.timedOutDurableClientProxies.remove(proxy.getProxyID()); }
/** * Adds a new <code>CacheClientProxy</code> to the list of known client * proxies * * @param proxy * The <code>CacheClientProxy</code> to add */ protected void addClientProxy(CacheClientProxy proxy) throws IOException { // this._logger.info(LocalizedStrings.DEBUG, "adding client proxy " + proxy); getCache(); // ensure cache reference is up to date so firstclient state is correct this._clientProxies.put(proxy.getProxyID(), proxy); // Remove this proxy from the init proxy list. removeClientInitProxy(proxy); this._connectionListener.queueAdded(proxy.getProxyID()); if (!(proxy.clientConflation == HandShake.CONFLATION_ON)) { // Delta not supported with conflation ON ClientHealthMonitor chm = ClientHealthMonitor.getInstance(); /* * #41788 - If the client connection init starts while cache/member is * shutting down, ClientHealthMonitor.getInstance() might return null. */ if (chm != null) { chm.numOfClientsPerVersion.incrementAndGet(proxy.getVersion().ordinal()); } } }
private boolean initializeProxy(CacheClientProxy l_proxy) throws IOException, CacheException { boolean status = false; if (!this.isProxyInInitializationMode(l_proxy)){ if (this._logger.fineEnabled()) { this._logger.fine("Initializing proxy, proxy :" + l_proxy); } try { // Add client proxy to initialization list. This has to be done before // the queue is created so that events can be buffered here for delivery // to the queue once it's initialized (bug #41681 and others) addClientInitProxy(l_proxy); l_proxy.initializeMessageDispatcher(); // Initialization success. Add to client proxy list. addClientProxy(l_proxy); return true; } catch (RegionExistsException ree) { if (this._logger.fineEnabled()) { String name = (ree.getRegion() != null)?(ree.getRegion().getFullPath()): "null region"; this._logger.fine("Found RegionExistsException while initializing proxy." + " Region name :" + name); } // This will return false; } finally { removeClientInitProxy(l_proxy); } } return status; }