Performs any operations required to close this consumer session,
but it does not modify any references which the connection might have.
333773
void _close()
                    throws SIResourceException, SIConnectionLostException,
                    SIErrorException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "_close");

        try
        {
            //close the LCP
            _localConsumerPoint.close();
        } catch (SINotPossibleInCurrentConfigurationException e)
        {
            // No FFDC code needed

            //Do nothing ... probably means that the Destination is being deleted
            //and so the LCP will be closed anyway
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "_close", e);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "_close");
    }
951521
protected void finishConnection() {
    this.connector.dispose();
    this.connector = null;
    for (ConnectionListener listener : this.connectionListeners) {
      listener.connectionEnded(this);
    }
    if (this.executors != null) {
      this.executors.destroy();
    }
  }
612638
public synchronized void close()
   {

      if (closed)
      {
         throw new IllegalStateException("Session provider already closed");
      }

      closed = true;

      for (ExtendedSession session : (ExtendedSession[])cache.values().toArray(
         new ExtendedSession[cache.values().size()]))
         session.logout();

      // the cache already empty (logout listener work, see onCloseSession())
      // just to be sure
      cache.clear();
   }
846667
def _close(self):
        
        if not self._closed:
            try:
                self._con.close()
            except Exception:
                pass
            self._transaction = False
            self._closed = True
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;
    }
302432
@Override
    public void closeConnection(Object connection) {
        if (connection!=null) {
            ((SoccomClient)connection).close();
            connection = null;
        }
    }
1008511
def close_connection(self, connection, force=False):
        """"""
        if force:
            try:
                connection.close()
            except self.operational_exceptions:
                self.config.logger.error('ConnectionFactory - failed closing')
            for name, conn in self.pool.iteritems():
                if conn is connection:
                    break
            del self.pool[name]
        else:
            pass
790194
void release() {
    long references = --this.references;
    if (!state.active() && references == 0) {
      context.sessions().unregisterSession(id);
      log.release(id);
      if (closeIndex > 0) {
        log.release(closeIndex);
      }
    }
  }
529693
private void closeConnection(Session session,
            GuacamoleStatus guacStatus) {

        closeConnection(session, guacStatus.getGuacamoleStatusCode(),
                guacStatus.getWebSocketCode());

    }
976480
void connectionCloses(final SynchronizeFXTomcatConnection connection) {
        LOG.info("Client connection closed.");
        synchronized (connections) {
            final ExecutorService executorService = connectionThreads.get(connection);
            if (executorService != null) {
                executorService.shutdown();
            }
            connectionThreads.remove(connection);
            connections.remove(connection);
        }
    }
1223192
@Override
  public boolean stop()
  {
    if (! _lifecycle.toStopping())
      return false;

    log.finest(this + " stopping");

    closeConnections();

    destroy();

    return true;
  }
274153
public void close() {
        try {
            state = "CLOSING";
            if( connection != null ) {
                logger.warn("Connection not committed, rolling back.");
                rollback();
            }
            if( !events.empty() ) {
                state = "CLOSING EVENTS";
                do {
                    Execution exec = (Execution)events.pop();
                
                    try {
                        Stack<Execution> stack;
                        
                        exec.close();
                        stack = eventCache.get(exec.getClass().getName());
                        if( stack != null ) {
                            stack.push(exec);
                        }
                    }
                    catch( Throwable t ) {
                        logger.error(t.getMessage(), t);
                    }
                } while( !events.empty() );
            }
            state = "CLOSED";
        }
        finally {
            if (tracking) {
                transactions.remove(new Integer(transactionId));
            }
            events.clear();
            statements.clear();
            stackTrace = null;
        }
    }
449583
@Override
    public void close() {
        if (isClosed) {
            return;
        }

        TransactionOLTP localTx = localOLTPTransactionContainer.get();
        if (localTx != null) {
            localTx.close(ErrorMessage.SESSION_CLOSED.getMessage(keyspace()));
            localOLTPTransactionContainer.set(null);
        }

        if (this.onClose != null) {
            this.onClose.accept(this);
        }

        isClosed = true;
    }
133986
public synchronized void closeImmediatedly() {

        close();

        Iterator iterator = this.connectionsInUse.iterator();

        while (iterator.hasNext()) {
            PooledConnection connection = (PooledConnection) iterator.next();
            SessionConnectionWrapper sessionWrapper =
                (SessionConnectionWrapper) this.sessionConnectionWrappers.get(
                    connection);

            closeSessionWrapper(
                sessionWrapper,
                "Error closing session wrapper. Connection pool was shutdown immediatedly.");
        }
    }
1014008
void closeConnections()
    {
        final String methodName = "closeConnections";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName);
        }

        synchronized (_connections)
        {
            Collection<SibRaMessagingEngineConnection> cons = _connections.values();
            Iterator<SibRaMessagingEngineConnection> iter = cons.iterator();
            while (iter.hasNext())
            {
                SibRaMessagingEngineConnection connection = iter.next();
                connection.close();
            }
            _connections.clear();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(TRACE, methodName);
        }
    }
271710
public void releaseConnection(Connection<T> connection)
    {
        if(connection!=null)
        {
            try
            {
                //log info
                this.LOGGER.logInfo(new Object[]{"Closing connection using factory type: ",this.getClass().getName()},null);

                //get resource
                T resource=connection.getResource();
                
                //release resource
                this.releaseResource(resource);
                
                //unregister connection
                CloseableResourceManager.unregisterCloseable(connection);

                //log info
                this.LOGGER.logInfo(new Object[]{"Connection closed."},null);
            }
            catch(Exception exception)
            {
                //log error
                this.LOGGER.logInfo(new Object[]{"Unable to close connection."},exception);
            }
        }
    }
167922
@Override
    public void destroy()
    {
        // if(logger.isDebugEnabled())
        logger.info("on close destroying connection pool");

        if (getConnectionPoolOrConnection() != null && getConnectionPoolOrConnection() instanceof JedisPool)
        {
            ((JedisPool) getConnectionPoolOrConnection()).destroy();
        }
        else if (getConnectionPoolOrConnection() != null && getConnectionPoolOrConnection() instanceof Jedis)
        {
            ((Jedis) getConnectionPoolOrConnection()).disconnect();
        }

    }