예제 #1
0
 /**
  * ( begin auto-generated from Server_disconnect.xml )
  *
  * <p>Disconnect a particular client.
  *
  * <p>( end auto-generated )
  *
  * @brief Disconnect a particular client.
  * @webref server:server
  * @param client the client to disconnect
  */
 public void disconnect(Client client) {
   client.stop();
   int index = clientIndex(client);
   if (index != -1) {
     removeIndex(index);
   }
 }
예제 #2
0
파일: RPC.java 프로젝트: baeeq/hadoop-20
 /**
  * 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();
   }
 }