shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/BackendConnection.java
/**
     * Close connections.
     * 
     * @param forceRollback is force rollback
     * @return SQL exception when connections close
     */
Close connections.

@param forceRollback is force rollback
@return SQL exception when connections close
Close connections . @param forceRollback is force rollback @return SQL exception when connections close
public synchronized Collection<SQLException> closeConnections(final boolean forceRollback) {
        Collection<SQLException> result = new LinkedList<>();
        for (Connection each : cachedConnections.values()) {
            try {
                if (forceRollback && transactionStatus.isInTransaction()) {
                    each.rollback();
                }
                each.close();
            } catch (final SQLException ex) {
                result.add(ex);
            }
        }
        cachedConnections.clear();
        connectionPostProcessors.clear();
        return result;
    }
public synchronized Collection < SQLException > closeConnections ( final boolean forceRollback ) { Collection < SQLException > result = new LinkedList < > ( ) ; for ( Connection each : cachedConnections . values ( ) ) { try { if ( forceRollback && transactionStatus . isInTransaction ( ) ) { each . rollback ( ) ; } each . close ( ) ; } catch ( final SQLException ex ) { result . add ( ex ) ; } } cachedConnections . clear ( ) ; connectionPostProcessors . clear ( ) ; return result ; }
Close connections.
Close connections .