/** * Stop a RPC client connection * A RPC client is closed only when its reference count becomes zero. */ public void stopClient(Client client) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping client from cache: " + client); } synchronized (this) { client.decCount(); if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("removing client from cache: " + client); } clients.remove(client.getSocketFactory()); } } if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping actual client because no more references remain: " + client); } client.stop(); } } }
/** * Stop a RPC client connection * A RPC client is closed only when its reference count becomes zero. */ public void stopClient(Client client) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping client from cache: " + client); } synchronized (this) { client.decCount(); if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("removing client from cache: " + client); } clients.remove(client.getSocketFactory()); } } if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping actual client because no more references remain: " + client); } client.stop(); } } }
/** * Stop a RPC client connection * A RPC client is closed only when its reference count becomes zero. */ public void stopClient(Client client) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping client from cache: " + client); } synchronized (this) { client.decCount(); if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("removing client from cache: " + client); } clients.remove(client.getSocketFactory()); } } if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping actual client because no more references remain: " + client); } client.stop(); } } }
/** * Stop a RPC client connection * A RPC client is closed only when its reference count becomes zero. */ public void stopClient(Client client) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping client from cache: " + client); } synchronized (this) { client.decCount(); if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("removing client from cache: " + client); } clients.remove(client.getSocketFactory()); } } if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping actual client because no more references remain: " + client); } client.stop(); } } }
/** * Stop a RPC client connection * A RPC client is closed only when its reference count becomes zero. */ private void stopClient(Client client) { synchronized (this) { client.decCount(); if (client.isZeroReference()) { clients.remove(client.getSocketFactory()); } } if (client.isZeroReference()) { client.stop(); } } }
/** * Stop a RPC client connection * A RPC client is closed only when its reference count becomes zero. */ private void stopClient(Client client) { synchronized (this) { client.decCount(); if (client.isZeroReference()) { clients.remove(client.getSocketFactory()); } } if (client.isZeroReference()) { client.stop(); } } }
/** * Stop a RPC client connection * A RPC client is closed only when its reference count becomes zero. */ public void stopClient(Client client) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping client from cache: " + client); } synchronized (this) { client.decCount(); if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("removing client from cache: " + client); } clients.remove(client.getSocketFactory()); } } if (client.isZeroReference()) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping actual client because no more references remain: " + client); } client.stop(); } } }