/*
(non-Javadoc)

@see com.ibm.ws.objectManager.ObjectStore#close()
961929
public synchronized void close()
                    throws ObjectManagerException
    {
        // Invalidate out all ManagedObjects in inMemory Tokens to prevent them
        // from being used after shutdown.
        for (java.util.Iterator tokenIterator = inMemoryTokens.values().iterator(); tokenIterator.hasNext();) {
            java.lang.ref.Reference reference = (java.lang.ref.Reference) tokenIterator.next();
            if (reference != null) {
                Token token = (Token) reference.get();
                if (token != null)
                    token.invalidate();
            } // if (reference != null).
        } // for inMemoryTokens.

        // Help garbage collection. 
        inMemoryTokens.clear();
        inMemoryTokens = null;
    }
50062
public synchronized void close()
	{
		if (s != null) {
			super.close();
			try {
				s.close();
			}
			catch (final IOException e) {}
			s = null;
		}
	}
525129
@Override
    public void close() {
        if (this.closed.compareAndSet(false, true)) {
            this.extensions.values().forEach(SegmentContainerExtension::close);
            Futures.await(Services.stopAsync(this, this.executor));
            this.metadataCleaner.close();
            this.writer.close();
            this.durableLog.close();
            this.readIndex.close();
            this.storage.close();
            log.info("{}: Closed.", this.traceObjectId);
        }
    }
146621
@Override
	public final void close()
    {
    	externalAccessLock.writeLock().lock();
    	try
		{
	        if (closed)
	            return;
	        closed = true;
	        onConnectionClose();
		}
    	finally
    	{
    		externalAccessLock.writeLock().unlock();
    	}
    	onConnectionClosed();
    }
740038
public void close() throws IOException {
		System.out.println("Serialized "
				+ this.jsonSerializer.getEntityDocumentCount()
				+ " item documents to JSON file " + OUTPUT_FILE_NAME + ".");
		this.jsonSerializer.close();
	}
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;
  }
909482
@Override public void close() {
    if (parent != null) parent.remove(this);
    setState(State.DISPOSED);
    setBatch(null);
  }
76814
@Override
	public void close() {
		AppEngineTransaction tx = transaction.get();
		
		if (tx != null) {
			tx.rollback();
		}
	}
215514
public void close () {
		Connection[] connections = this.connections;
		for (int i = 0; i < connections.length; i++)
			connections[i].removeListener(invokeListener);

		synchronized (instancesLock) {
			ArrayList<ObjectSpace> temp = new ArrayList(Arrays.asList(instances));
			temp.remove(this);
			instances = temp.toArray(new ObjectSpace[temp.size()]);
		}

		if (TRACE) trace("kryonet", "Closed ObjectSpace.");
	}
973030
@Override
  public void close() {
    if (isClosed())
      return;

    objects2Records.clear();
    records2Objects.clear();
    rid2Records.clear();

    checkOpeness();
    rollback();

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

    ownerPool.release(this);
    ownerPool = null;
  }
766351
public void close() throws IOException {
    if (kids != null) {
      for (RecordReader<K,? extends Writable> rr : kids) {
        rr.close();
      }
    }
    if (jc != null) {
      jc.close();
    }
  }
1332900
@Override
    public void close() {
        if (zipFileSliceReaderRecycler != null) {
            zipFileSliceReaderRecycler.close();
        }
        if (entries != null) {
            entries.clear();
            entries = null;
        }
    }
815487
@Override @DefinedBy(Api.COMPILER)
    public void close() throws IOException {
        if (deferredCloseTimeout > 0) {
            deferredClose();
            return;
        }

        locations.close();
        for (Container container: containers.values()) {
            container.close();
        }
        containers.clear();
        contentCache.clear();
    }
1050643
@Override
    public void close() throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "close");
        try {
            messageConsumer.close();
        } catch (JMSException jmse) {
            JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.entry(this, tc, "close");
        }

    }
667088
@Close
    public void close() {
        DatastoreConnection datastoreConnection = getDatastoreConnections().poll();
        if (datastoreConnection != null) {
            logger.info("Closing dictionary: {}", this);
            datastoreConnection.close();
        }
    }
1061960
@Override
    public void close() {
        if (!this.closed.getAndSet(true)) {
            if (this.fileSystem != null) {
                try {
                    this.fileSystem.close();
                    this.fileSystem = null;
                } catch (IOException e) {
                    log.warn("Could not close the HDFS filesystem: {}.", e);
                }
            }
        }
    }
945451
public void close() {
    if (pool != null)
      pool.close();

    pool = null;
    if (shouldCloseOrientDB) {
      factory.close();
    }
  }