/*
(non-Javadoc)

@see javax.jms.QueueBrowser#close()
508686
@Override
    public void close() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "close");

        int originalState = 0;
        Object[] enumCopy = null;

        synchronized (enums) {
            // Save the state of the closed flag before we update it here. If
            // this is the first time that close has been called then we want
            // to carry out the logic, otherwise silently complete with no
            // further action.
            originalState = state;
            state = CLOSED;

            // Make sure that we do this part inside the sync block too in order
            // to prevent concurrent modification problems.
            enumCopy = enums.toArray();
        }

        if (originalState != CLOSED) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "About to close " + enumCopy.length + " enums.");
            for (int i = 0; i < enumCopy.length; i++) {
                EnumImpl anEnum = (EnumImpl) enumCopy[i];
                anEnum.close();
            }

            // Remove from the list maintained in the session.
            theSession.removeBrowser(this);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "close");
    }
33269
@Override
    public void close() throws IOException
    {
        if (out != null)
        {
            out.close();
            out = null;
        }
        if (in != null)
        {
            in.close();
            in = null;
        }
    }
775380
@Override
    public void close() {
        if (this.inputStream != null) {
            try {
                this.inputStream.close();
            } catch (final IOException e) {
                // Ignore
            }
            this.inputStream = null;
        }
        this.byteBuffer = null;
        this.buf = null;
    }
894257
public static void close() {
    synchronized (poolMap) {
      for (Pool pool : poolMap.values()) {
        try {
          pool.close();
        } catch (InterruptedException exception) {
          //eat
        }
      }
      shutdownExecutor();
      poolMap.clear();
    }
  }
784484
@Override
	public void close() {
		synchronized (this) {
			if (object != null) {
				T object_ = object;
				object = null;
				try {
					finalizer.accept(object_);
				} catch (Exception e) {
					// Ignored
				}
			}
		}
	}
682176
public void close() {
    /**
     * Set closed flag and notify all threads to check their conditions.
     * Should result in dispatcher terminating.
     */
    synchronized (buffer) {
      closed = true;
      buffer.notifyAll();
    }

    try {
      dispatcher.join();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      org.apache.log4j.helpers.LogLog.error(
        "Got an InterruptedException while waiting for the "
        + "dispatcher to finish.", e);
    }

    //
    //    close all attached appenders.
    //
    appenders.closeAppenders();
  }
522276
@Override
	public void close() {
		try {
			if (!jacksonParser.isClosed())
				jacksonParser.close();
		} catch (IOException e) {
			e.printStackTrace();
			throw(new KriptonRuntimeException(e));
		}
		
	}
510457
@Override
  public synchronized void close() {
    if (endHandler != null) {
      endHandler.handle(null);
    }
    closed = true;
    if (listener != null && handleCalled) {
      listener.sessionClosed();
    }
  }
162784
public void close() {
        try {
            synchronized (lock) {
                if (out == null)
                    return;
                out.close();
                out = null;
            }
        }
        catch (IOException x) {
            trouble = true;
        }
    }
474586
public void close() throws IOException {
        if (!closed) {
            this.finish();
            this.buffer.close();
            out.close();
            closed = true;
        }
    }
1187800
@Override
  public void close() {
    try {
      if ( content != null ) content.close();
    } catch (XMLStreamException e) {
      logger.error("Failed to close underlying XMLStreamReader",e);
      throw new MarkLogicIOException(e);
      // whether that failed or not, attempt to close underlying InputStream
    } finally {
      if ( contentSource != null ) {
        try {
          contentSource.close();
        } catch (IOException e) {
          logger.error("Failed to close underlying InputStream",e);
          throw new MarkLogicIOException(e);
        }
      }
    }
  }
62081
public void close() {
        Iterator<SocketDestination> it = getStatsMap().keySet().iterator();
        while(it.hasNext()) {
            try {
                SocketDestination destination = it.next();
                JmxUtils.unregisterMbean(JmxUtils.createObjectName(JmxUtils.getPackageName(ClientRequestExecutor.class),
                                                                   "stats_"
                                                                           + destination.toString()
                                                                                        .replace(':',
                                                                                                 '_')
                                                                           + identifierString));
            } catch(Exception e) {}
        }
    }
108535
@Override
    public void close()
    {
        Preconditions.checkState(Thread.currentThread().equals(ourThread), "Not in the correct thread");
        failedSessionThreads.remove(ourThread);

        client.removeParentWatcher(watcher);
    }
1309136
public void close() {
		if (this.sock != null)
			try {
				this.sock_in.close();
				this.sock_out.close();
				this.sock.close();
				this.sock=null;
				this.sock_in=null;
				this.sock_out=null;
			} catch (IOException e) {
			}
	}
174129
@Override
    public void close() {
        if (params != null && params.closeHandler != null) {
            params.closeHandler.run();
            params.closeHandler = null;
        }
    }
680735
@Override
    public void close() {
        closeComponent(this.containerManager);
        closeComponent(this.containerRegistry);
        closeComponent(this.dataLogFactory);
        closeComponent(this.readIndexFactory);
        closeComponent(this.cacheFactory);
        this.cacheManager.close();
        this.threadPoolMetrics.close();
        ExecutorServiceHelpers.shutdown(SHUTDOWN_TIMEOUT, this.storageExecutor, this.coreExecutor);
    }
1024393
@Beta(SinceVersion.V1_1_0)
    public void close() {
        httpClient.dispatcher().executorService().shutdown();
        httpClient.connectionPool().evictAll();
        synchronized (httpClient.connectionPool()) {
            httpClient.connectionPool().notifyAll();
        }
        synchronized (AsyncTimeout.class) {
            AsyncTimeout.class.notifyAll();
        }
    }