closes the QueryEngine, clearing the cached information are closing the AerospikeClient.
Once the QueryEngine is closed, it cannot be used, nor can the AerospikeClient.
193544
@Override
	public void close() throws IOException {
		if (this.client != null)
			this.client.close();
		indexCache.clear();
		indexCache = null;
		updatePolicy = null;
		insertPolicy = null;
		infoPolicy = null;
		queryPolicy = null;
		moduleCache.clear();
		moduleCache = null;
	}
410629
public synchronized void close() throws IOException {
        if (!opened) {
            return;
        }
        //
        opened = false;
        accessor.close();
        appender.close();
        hints.clear();
        inflightWrites.clear();
        //
        if (managedWriter) {
            ((ExecutorService) writer).shutdown();
            writer = null;
        }
        if (managedDisposer) {
            disposer.shutdown();
            disposer = null;
        }
    }
302496
@Override
    public void close() {
        try {
            if (clientSidePolicy != null) {
                clientSidePolicy.removePropertyChangeListener(this);
            }

        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Finished servicing http request on conduit. ");
            }
            //clean up address within threadlocal of EndPointInfo
            endpointInfo.resetAddress();    //Liberty #3669
        }

    }
746496
public void close() {
    clientLock.writeLock().lock();
    try {
      if (client != null) {
        RPC.stopProxy(client);
        client = null;
      }
    } finally {
      clientLock.writeLock().unlock();
    }
  }
343856
final void close() {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "close : " + ivArchivePuId, this);

        // First, prevent any further EntityManager factories from being
        // created. EMFs may be created for each java:comp/env context.
        if (ivEMFMap != null) {
            synchronized (ivEMFMap) {
                ivCreateEMFAllowed = false;
            }
        }

        // Next, shutdown any EntityManager pools that exist.  This will close
        // all of the pooled EMs and prevent the pools from adding any more EMs.
        // This does NOT close any EMs that customers may be actively using...
        // and it is also possible a new pool may be created prior to closing
        // the EMFs below, but the EMF close is gauranteed to close all EMs
        // associated with it.                                             d510184
        synchronized (ivEMPoolMap) {
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(tc, "shutting down EM pools : " + ivEMPoolMap.size());

            for (JPAEMPool emPool : ivEMPoolMap.values()) {
                emPool.shutdown();
            }
        }

        unregisterClassFileTransformer(ivClassLoader);

        // Finally, close the base EMF, and any EMFs that have been created
        // for each java:comp/env.
        if (ivEMFactory != null) {
            // d455363 Begins
            if (ivEMFactory.isOpen()) {
                try {
                    if (isTraceOn && tc.isDebugEnabled())
                        Tr.debug(tc, "closing base EMF");
                    ivEMFactory.close();
                } catch (Exception e) {
                    FFDCFilter.processException(e, CLASS_NAME + ".close",
                                                "934", this);

                    if (isTraceOn && tc.isDebugEnabled())
                        Tr.debug(tc, "Caught unexpected exception on factory.close():" + e);
                }
            }
            // d455363 Ends

            // Close all of the factories for each J2EEName when the datasource
            // is defined in java:comp/env.                                 d510184
            if (ivEMFMap != null) {
                for (EntityManagerFactory emFactory : ivEMFMap.values()) {
                    if (emFactory.isOpen()) {
                        try {
                            if (isTraceOn && tc.isDebugEnabled())
                                Tr.debug(tc, "closing component EMF");
                            emFactory.close();
                        } catch (Exception e) {
                            FFDCFilter.processException(e, CLASS_NAME + ".close",
                                                        "934", this);

                            if (isTraceOn && tc.isDebugEnabled())
                                Tr.debug(tc, "Caught unexpected exception on factory.close():" + e);
                        }
                    }
                }
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "close : " + ivArchivePuId);
    }
136887
def close(self):
        
        if self.closed is False:
            self._client.close()
            self.closed = True
            if self.debug is True:
                print('close')
        if self.debug is True:
            print("closed")
170601
def close(self):
        
        if self.host is None:
            raise ModHostError('There is no established connection with mod-host. '
                               'Did you call the `connect()` method?')

        super(ModHost, self).close()

        if self._started_with_this_api:
            self.host.quit()
        else:
            self.host.close()
402469
public boolean close()
    {
        if (getDelegate() == null) return true;
        try
        {
            PersistenceBrokerThreadMapping.unsetCurrentPersistenceBroker(getPBKey(), this);
            super.close();
        }
        finally
        {
            /*
            here we destroy the handle. set the
            underlying PB instance 'null', thus it's not
            possible to corrupt a closed PB instance.
            */
            setDelegate(null);
        }
        return true;
    }
445225
public void close(boolean closeConnection) throws SQLException {
        if (closeConnection) {
            resultSet.getStatement().getConnection().close();
        } else {
            resultSet.close();
        }

        finished = true;
    }
242794
public static void close(SolrClient solrClient) {

		Assert.notNull(solrClient, "SolrClient must not be null!");

		try {
			if (solrClient instanceof Closeable) {
				solrClient.close();
			} else {
				Method shutdownMethod = ReflectionUtils.findMethod(solrClient.getClass(), "shutdown");
				if (shutdownMethod != null) {
					shutdownMethod.invoke(solrClient);
				}
			}
		} catch (Exception e) {
			throw new DataAccessResourceFailureException("Cannot close SolrClient", e);
		}
	}
4714
public void close() throws QueryException {
        try {
            if(! (socket instanceof SSLSocket))
                socket.shutdownInput();
        } catch (IOException ignored) {
        }
        try {
            final ClosePacket closePacket = new ClosePacket();
            closePacket.send(writer);
            if (! (socket instanceof SSLSocket))
                socket.shutdownOutput();
            writer.close();
            packetFetcher.close();
        } catch (IOException e) {
            throw new QueryException("Could not close connection: " + e.getMessage(),
                    -1,
                    SQLExceptionMapper.SQLStates.CONNECTION_EXCEPTION.getSqlState(),
                    e);
        } finally {
            try {
                this.connected = false;
                socket.close();
            } catch (IOException e) {
                log.warning("Could not close socket");
            }
        }
        this.connected = false;
    }
322168
@Override
	public void sessionClosed(IoSession session) throws Exception {
		log.debug("Session closed for sensor {}.", session);
		if (this.sensorIoAdapter != null) {
			this.sensorIoAdapter.sensorDisconnected(session);
		}
	}
1172953
@SuppressWarnings("unused")
    private void close() {
        try {
            if (LOGGER.isTraceEnabled()) {
                LOGGER.trace("Doing client selector close");
            }
            selector.close();
            if (LOGGER.isTraceEnabled()) {
                LOGGER.trace("Closed client selector");
            }
        } catch (IOException e) {
            LOGGER.warn("Ignoring exception during selector close", e);
        }
    }
400153
public void close() {
		forwardEngine.close();
		if (forwardEngine != reverseEngine) {
			reverseEngine.close();
		}
		for (Long ssrc : contexts.keySet()) {
			SRTPCryptoContext context = contexts.get(ssrc);
			if (context != null) {
				context.close();
				contexts.remove(ssrc);
			}
		}
	}
1261689
public void close() {
        if (log.isLoggable(Level.FINEST)) {
            log.finest("Close Elasticsearch node=" + node + " client=" + client);
        }

        if (client != null) {
            client.close();
            client = null;
        }

        if (node != null) {
            node.stop();
            node = null;
        }
    }
913508
public void setClient(AerospikeClient client) {
		this.client = client;
		this.updatePolicy = new WritePolicy(this.client.writePolicyDefault);
		this.updatePolicy.recordExistsAction = RecordExistsAction.UPDATE_ONLY;
		this.insertPolicy = new WritePolicy(this.client.writePolicyDefault);
		this.insertPolicy.recordExistsAction = RecordExistsAction.CREATE_ONLY;
		this.queryPolicy = client.queryPolicyDefault;
		refreshCluster();
		registerUDF();
	}
517040
public void close() {
        lock.lock();
        try {
            if (this.closed) {
                return;
            }

            if (!this.inited) {
                return;
            }

            if (logStatsThread != null) {
                logStatsThread.interrupt();
            }

            if (createConnectionThread != null) {
                createConnectionThread.interrupt();
            }

            if (destroyConnectionThread != null) {
                destroyConnectionThread.interrupt();
            }

            if (destroySchedulerFuture != null) {
                destroySchedulerFuture.cancel(true);
            }

            for (int i = 0; i < poolingCount; ++i) {
                try {
                    DruidConnectionHolder connHolder = connections[i];

                    for (PreparedStatementHolder stmtHolder : connHolder.getStatementPool().getMap().values()) {
                        connHolder.getStatementPool().closeRemovedStatement(stmtHolder);
                    }
                    connHolder.getStatementPool().getMap().clear();

                    Connection physicalConnection = connHolder.getConnection();
                    physicalConnection.close();
                    connections[i] = null;
                    destroyCount.incrementAndGet();
                } catch (Exception ex) {
                    LOG.warn("close connection error", ex);
                }
            }
            poolingCount = 0;

            // close elasticsearch client
            if (this.client != null) {
                this.client.close();
            }

            unregisterMbean();

            enable = false;
            notEmpty.signalAll();
            notEmptySignalCount++;

            this.closed = true;
            this.closeTimeMillis = System.currentTimeMillis();

            for (Filter filter : filters) {
                filter.destroy();
            }
        } finally {
            lock.unlock();
        }

        if (LOG.isInfoEnabled()) {
            LOG.info("{dataSource-" + this.getID() + "} closed");
        }
    }