Closes this <tt>UDPMasterConnection</tt>.
506013
public void close() {
        if (connected) {
            try {
                terminal.deactivate();
            }
            catch (Exception ex) {
                logger.debug("Exception occurred while closing UDPMasterConnection", ex);
            }
            connected = false;
        }
    }
1193674
public void close() {
    synchronized (lock) {
      while (!available.isEmpty()) {
        PooledConnection pci = available.pop();
        try {
          pci.close();
        } catch (SQLException e) {
        }
      }
      available = null;
      while (!used.isEmpty()) {
        PooledConnection pci = used.pop();
        pci.removeConnectionEventListener(connectionEventListener);
        try {
          pci.close();
        } catch (SQLException e) {
        }
      }
      used = null;
    }
    removeStoredDataSource();
  }
557242
public void close() {

        if (this.xaConnection != null) {
            this.xaConnection.doClose();
        }
        this.closed = true;
        this.notifyClosed();

        if (LOG.isDebugEnabled()) {
            LOG.debug("PhynixxXAResource[" + this.getId() + "]:closed ");
        }
    }
604154
public void close() throws InterruptedException {
    synchronized (this) {
      Pools.remove(this);
      poolState.set(POOL_STATE_CLOSING);
      pendingRequestNumber.set(0);

      scheduledFuture.cancel(false);
      connectionAppender.shutdown();

      try {
        connectionAppender.awaitTermination(10, TimeUnit.SECONDS);
      } catch (InterruptedException i) {
        //eat
      }

      if (logger.isInfoEnabled()) {
        logger.info("closing pool {} (total:{}, active:{}, pending:{})",
            poolTag, totalConnection.get(), getActiveConnections(), pendingRequestNumber.get());
      }

      ExecutorService connectionRemover = new ThreadPoolExecutor(totalConnection.get(),
          options.maxPoolSize, 10, TimeUnit.SECONDS,
          new LinkedBlockingQueue<>(options.maxPoolSize),
          new MariaDbThreadFactory(poolTag + "-destroyer"));

      //loop for up to 10 seconds to close not used connection
      long start = System.nanoTime();
      do {
        closeAll(connectionRemover, idleConnections);
        if (totalConnection.get() > 0) {
          Thread.sleep(0, 10_00);
        }
      } while (totalConnection.get() > 0
          && TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start) < 10);

      //after having wait for 10 seconds, force removal, even if used connections
      if (totalConnection.get() > 0 || idleConnections.isEmpty()) {
        closeAll(connectionRemover, idleConnections);
      }

      connectionRemover.shutdown();
      try {
        unRegisterJmx();
      } catch (Exception exception) {
        //eat
      }
      connectionRemover.awaitTermination(10, TimeUnit.SECONDS);
    }
  }
697456
public void stop() {
        synchronized (LOCK) {
            if (this.active) {
                this.active = false;
                logger.info("Stopping UDP Manager");
                stopTasks();
                closeSelectors();
                cleanResources();
                logger.info("UDP Manager has stopped");
            }
        }
    }
233494
public void close() {
    try {
      if (conn != null) {
        conn.close();
      }
    } catch (IOException ignored) { }

    if (zkClient != null) {
      zkClient.stopAndWait();
    }
  }
684520
@Override
    public void shutdown() {
        synchronized (connections) {
            parent.channelCloses(this);
            for (final MessageInbound connection : connections) {
                try {
                    connection.getWsOutbound().close(0, null);
                } catch (final IOException e) {
                    LOG.error("Connection [" + connection.toString() + "] can't be closed.", e);
                } finally {
                    final ExecutorService executorService = connectionThreads.get(connection);
                    if (executorService != null) {
                        executorService.shutdown();
                    }
                    connectionThreads.remove(connection);
                }
            }
            connections.clear();
        }
        callback = null;
    }
577606
public void close() {
        long endNanos = System.nanoTime();
        long durationNanos = endNanos - startNanos;
        connectionPoolCallback.releaseConnection(durationNanos);
    }
90497
public function close()
    {
        if($this->isUDP()) {
            Yii::warning("Clos UDP connection is meaningless.", 'beyod');
            return ;
        }
        
        $this->status = static::STATUS_CLOSED;
        $this->removeEventLooper();
        
        $this->trigger(Server::ON_CLOSE, new CloseEvent());
        $this->destroy();
    }
1278568
public void close() throws IOException {
        final ManagedBinding binding = this.socketBindingManager.getNamedRegistry().getManagedBinding(this.name);
        if (binding == null) {
            return;
        }
        binding.close();
    }
213084
def close(self):
        
        try:
            self.connection.close()
            self.connection = None
        except Exception:
            if not self.fail_silently:
                raise
578306
public synchronized void close() {
        acceptor.quit();
        OtpCookedConnection conn;
        final Collection<OtpCookedConnection> coll = connections.values();
        final Iterator<OtpCookedConnection> it = coll.iterator();

        mboxes.clear();

        while (it.hasNext()) {
            conn = it.next();
            it.remove();
            conn.close();
        }
        initDone = false;
    }
509676
public function closeConnection () {
        if ( $this->transport->getSmtp()->isConnect()) {
            $this->transport->getSmtp()->rset();
            $this->transport->getSmtp()->disconnect();
        }
    }
63767
public void close()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    	SibTr.entry(tc, "close");
    btmLockManager.lockExclusive();
    try
    {
      stopTimer();
      activeEntries = null;
    }
    finally
    {
      btmLockManager.unlockExclusive();
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    	SibTr.exit(tc, "close");
  }
10118
@Override
	protected void onConnectionClose()
    {
    	super.onConnectionClose();
    	
    	try
        {
        	if (transport != null && !transport.isClosed())
        	{
	            log.debug("#"+id+" Closing transport");
	            this.transport.close();
        	}
        }
        catch (Exception e)
        {
            log.error("Could not close transport",e);
        }
    }
438086
@Override
    public void close() throws IOException, IllegalStateException {
        if (this.open.compareAndSet(true, false)) {
            try {
                this.eventGroup.shutdownGracefully(0L, 5L, TimeUnit.SECONDS).sync();
            } catch (Exception e) {
                throw new IOException("Could not be gracefully closed.", e);
            }
        } else {
            throw new IllegalStateException("Network Manager is already closed");
        }
    }
522611
public void close() throws ZkInterruptedException {
        if (_connection == null) {
            return;
        }
        LOG.debug("Closing ZkClient...");
        getEventLock().lock();
        try {
            setShutdownTrigger(true);
            _eventThread.interrupt();
            _eventThread.join(2000);
            _connection.close();
            _connection = null;
        } catch (InterruptedException e) {
            throw new ZkInterruptedException(e);
        } finally {
            getEventLock().unlock();
        }
        LOG.debug("Closing ZkClient...done");
    }