Close any open database object.
963160
public synchronized void close() {
        if (mIsInitializing) throw new IllegalStateException("Closed during initialization");

        if (mDatabase != null && mDatabase.isOpen()) {
            mDatabase.close();
            mDatabase = null;
        }
    }
8969
@Override
    public synchronized void close() {
        if (isOpen()) {
            clearCache();
            closeStatements();
            try {
                connection.close();
            } catch (SQLException ex) {
                LOGGER.error("There was an error attempting to close the CveDB, see the log for more details.");
                LOGGER.debug("", ex);
            } catch (Throwable ex) {
                LOGGER.error("There was an exception attempting to close the CveDB, see the log for more details.");
                LOGGER.debug("", ex);
            }
            releaseResources();
            connectionFactory.cleanup();
        }
    }
289190
def close(self):
        """"""
        while 1:
            try:
                con = self._cache.get(0)
                try:
                    con.close()
                except Exception:
                    pass
                if self._connections:
                    self._connections.release()
            except Empty:
                break
782700
@Override
  public void close() {
    if (isClosed())
      return;

    checkOpeness();
    rollback();

    final OMetadata md = getMetadata();
    if (md != null)
      md.close();

    ((ODatabaseRaw) ((ODatabaseRecord) underlying).getUnderlying()).callOnCloseListeners();
    getLevel1Cache().clear();

    ownerPool.release(this);
    ownerPool = null;
  }
1089541
def close(self):
        """"""
        for cid in list(self.connections.keys()):
            self.remove(self.connections[cid].handle)
        LOGGER.debug('Pool %s closed', self.id)
1054953
public void close()
    {
        super.close();  // Do any inherited
        try   {
            if (m_remoteDatabase != null)
            {
                synchronized (this.getSyncObject(m_remoteDatabase))
                {   // In case this is called from another task
                    m_remoteDatabase.close();
                }
            }
        } catch (RemoteException ex)    {
            Utility.getLogger().warning("Remote close error: " + ex.getMessage());
            ex.printStackTrace();
        }
    }
708322
def close(self):
        

        if self.__delayed_connection_path and self.__connection is None:
            self.__initialize_connection()
            return

        try:
            self.check_connection()
        except (SystemError, NullDatabaseConnectionError):
            return

        logger.debug("close connection to a SQLite database: path='{}'".format(self.database_path))

        self.commit()
        self.connection.close()
        self.__initialize_connection()
486601
final void closeAndRemoveAllDatabaseHandles() {
        for (Database databaseHandle : this.databaseHandles) {
            try {
                databaseHandle.close();
            } catch (EnvironmentFailureException | IllegalStateException ex) {
                LOGGER.log(Level.SEVERE,
                        "Error closing databases", ex);
            }
        }
        this.databaseHandles.clear();
    }
427143
@Override
    public synchronized void close() {
        try {

            for (final PreparedStatementCapsule preparedStatement : stmts.values()) {
                try {
                    preparedStatement.ps.close();
                } catch (final SQLException e) {
                    logger.warn("Could not close statement.", e);
                }
            }

            stmts.clear();

            entities.forEach((key, mappedEntity) -> closeMappedEntity(mappedEntity));

            if (properties.isSchemaPolicyCreateDrop()) {
                dropAllEntities();
            }

            conn.close();
            logger.debug("Connection to database closed");

        } catch (final SQLException ex) {
            logger.warn("Unable to close connection", ex);
        }
    }
688131
public synchronized void shutdown() {
		if (instances.size() > 0) {
			OLogManager.instance().debug(null,
					"Found %d databases opened during OrientDB shutdown. Assure to always close database instances after usage",
					instances.size());

			for (ODatabaseComplex<?> db : new HashSet<ODatabaseComplex<?>>(instances.keySet())) {
				if (db != null && !db.isClosed()) {
					db.close();
				}
			}
		}
	}
709386
public void close() throws SQLException {
    if (!closed) {
      // flush any open output streams
      if (os != null) {
        try {
          // we can't call os.close() otherwise we go into an infinite loop!
          os.flush();
        } catch (IOException ioe) {
          throw new PSQLException("Exception flushing output stream", PSQLState.DATA_ERROR, ioe);
        } finally {
          os = null;
        }
      }

      // finally close
      FastpathArg[] args = new FastpathArg[1];
      args[0] = new FastpathArg(fd);
      fp.fastpath("lo_close", args); // true here as we dont care!!
      closed = true;
      if (this.commitOnClose) {
        this.conn.commit();
      }
    }
  }
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
1342126
def close_database_session(session):
    """"""

    try:
        session.close()
    except OperationalError as e:
        raise DatabaseError(error=e.orig.args[1], code=e.orig.args[0])
929880
def close
      return if sessions.empty?
      sessions.each do |session|
        session.close
        session.delete_observer self
      end
      # TODO: should close database connection
    end
1180921
def close(self):
        """"""
        if self.parent != ():
            self.parent.flush()
            self.parent.close()
        if self.hdf5:  # is open
            self.hdf5.flush()
            self.hdf5.close()
            self.hdf5 = ()
282515
public void close() throws OdaException
	{
		if (db!=null && !db.isClosed()){
			db.close();
		}
		db = null;
	    m_isOpen = false;
	}
794885
public void close() {
    for (Entry<String, OResourcePool<String, DB>> pool : pools.entrySet()) {
      for (DB db : pool.getValue().getResources()) {
        pool.getValue().close();
        try {
          OLogManager.instance().debug(this, "Closing pooled database '%s'...", db.getName());
          ((ODatabasePooled) db).forceClose();
          OLogManager.instance().debug(this, "OK", db.getName());
        } catch (Exception e) {
          OLogManager.instance().debug(this, "Error: %d", e.toString());
        }
      }
    }
  }