close/release any resources held by this WaybackCollection
@throws IOException when thrown by an internal class being shut down.
435536
public void shutdown() throws IOException {
		if(shutdownDone) {
			return;
		}
		if(resourceStore != null) {
			resourceStore.shutdown();
		}
		if(resourceIndex != null) {
			resourceIndex.shutdown();
		}
		if(shutdownables != null) {
			for(Shutdownable s : shutdownables) {
				s.shutdown();
			}
		}
		shutdownDone = true;
	}
236381
public final void close() {
        if (m_stream==null) {
            return;
        }
        try {
            m_stream.close();
        }
        catch (IOException e) {
        }
        if (m_nextException==null) {
            m_nextException=new IOException("Closed.");
        }
        m_stream=null;
        resetState();
    }
445732
public void releaseAllResources()
    {
        synchronized (poolSynch)
        {
            Collection pools = poolMap.values();
            poolMap = new HashMap(poolMap.size());
            ObjectPool op = null;
            for (Iterator iterator = pools.iterator(); iterator.hasNext();)
            {
                try
                {
                    op = ((ObjectPool) iterator.next());
                    op.close();
                }
                catch (Exception e)
                {
                    log.error("Exception occured while closing pool " + op, e);
                }
            }
        }
        super.releaseAllResources();
    }
515164
@Override
  public void close() throws IOException {
    final MapAppender appender = mapAppender;
    if (appender != null) {
      appender.close();
    }
    mapAppender = null;

    recordCache = null;
  }
1371782
@Override
	void releaseAllResources() throws IOException {
		if (isReleased.compareAndSet(false, true)) {

			// Gather all exclusive buffers and recycle them to global pool in batch, because
			// we do not want to trigger redistribution of buffers after each recycle.
			final List<MemorySegment> exclusiveRecyclingSegments = new ArrayList<>();

			synchronized (receivedBuffers) {
				Buffer buffer;
				while ((buffer = receivedBuffers.poll()) != null) {
					if (buffer.getRecycler() == this) {
						exclusiveRecyclingSegments.add(buffer.getMemorySegment());
					} else {
						buffer.recycleBuffer();
					}
				}
			}
			synchronized (bufferQueue) {
				bufferQueue.releaseAll(exclusiveRecyclingSegments);
			}

			if (exclusiveRecyclingSegments.size() > 0) {
				inputGate.returnExclusiveSegments(exclusiveRecyclingSegments);
			}

			// The released flag has to be set before closing the connection to ensure that
			// buffers received concurrently with closing are properly recycled.
			if (partitionRequestClient != null) {
				partitionRequestClient.close(this);
			} else {
				connectionManager.closeOpenChannelConnections(connectionId);
			}
		}
	}
537040
@Override
  public void close() throws IOException {
    if (!channelIsOpen) {
      logger.atFine().log("Ignoring close: channel for '%s' is not open.", resourceIdString);
      return;
    }
    logger.atFine().log("Closing channel for '%s'", resourceIdString);
    channelIsOpen = false;
    closeContentChannel();
  }
354901
void shutdown() throws IOException {
        synchronized (this) {
            for (BdbEnvironmentInfo envInfo : this.envInfos) {
                try {
                    envInfo.getClassCatalog().close();
                } catch (DatabaseException ignore) {
                    LOGGER.log(Level.SEVERE, "Failure closing class catalog", ignore);
                }
                envInfo.closeAndRemoveAllDatabaseHandles();
                
                try (Environment env = envInfo.getEnvironment()) {
                    if (this.deleteOnExit) {
                        FileUtil.deleteDirectory(env.getHome());
                    }
                }
            }
            this.envInfos.clear();
        }
    }
474586
public void close() throws IOException {
        if (!closed) {
            this.finish();
            this.buffer.close();
            out.close();
            closed = true;
        }
    }
78331
public void close() throws IOException {
        if (closeRequested)
            return;
        guard.close();
        closeRequested = true;

        synchronized (this) {
            // Close streams, release their inflaters
            synchronized (streams) {
                if (false == streams.isEmpty()) {
                    Map<InputStream, Inflater> copy = new HashMap<>(streams);
                    streams.clear();
                    for (Map.Entry<InputStream, Inflater> e : copy.entrySet()) {
                        e.getKey().close();
                        Inflater inf = e.getValue();
                        if (inf != null) {
                            inf.end();
                        }
                    }
                }
            }

            // Release cached inflaters
            Inflater inf;
            synchronized (inflaterCache) {
                while (null != (inf = inflaterCache.poll())) {
                    inf.end();
                }
            }

            if (jzfile != 0) {
                // Close the zip file
                long zf = this.jzfile;
                jzfile = 0;

                close(zf);
            }

            // Android-changed, explicit delete for OPEN_DELETE ZipFile.
            if (fileToRemoveOnClose != null) {
                fileToRemoveOnClose.delete();
            }
        }
    }
89049
@Override
  public final void close() {
    try {
      doClose();
      isClosed = true;
    } catch (Exception e) {
      Throwables.propagate(e);
    }
  }
159353
@Override
    public void close() throws IOException {
        super.close();
        if (entity != null) {

            entity.close();
        }
        if (snapshot != null) snapshot.close();
    }
774066
public void close() throws IOException
  {
    if (_isKeepalive) {
      // If recycling, read any unread data
      if (! _didGet)
        getConnInput();

      if (! _isRequestDone) {
        if (_tempBuffer == null)
          _tempBuffer = new byte[256];

        try {
          while (read(_tempBuffer, 0, _tempBuffer.length) > 0) {
          }
        } catch (IOException e) {
          _isKeepalive = false;
        }
      }
    }

    if (_isKeepalive) {
      HttpStream oldSaved;
      
      long now;
      
      now = CurrentTime.currentTime();
      
      synchronized (LOCK) {
        oldSaved = _savedStream;
        _savedStream = this;
        _saveTime = now;
      }

      if (oldSaved != null && oldSaved != this) {
        oldSaved._isKeepalive = false;
        oldSaved.close();
      }

      return;
    }

    try {
      try {
        if (_ws != null)
          _ws.close();
      } catch (Throwable e) {
      }
      _ws = null;

      try {
        if (_rs != null)
          _rs.close();
      } catch (Throwable e) {
      }
      _rs = null;

      try {
        if (_os != null)
          _os.close();
      } catch (Throwable e) {
      }
      _os = null;

      try {
        if (_is != null)
          _is.close();
      } catch (Throwable e) {
      }
      _is = null;
    } finally {
      if (_s != null)
        _s.close();
      _s = null;
    }
  }
1278568
public void close() throws IOException {
        final ManagedBinding binding = this.socketBindingManager.getNamedRegistry().getManagedBinding(this.name);
        if (binding == null) {
            return;
        }
        binding.close();
    }
219146
@Override
  public final void close()
      throws IOException {
    try {
      // end collection
      writer.writeEndCollection()
          .writeEndDocument()
          .close();
    } catch (XMLStreamException e) {
      throw new IOException(e.getMessage());
    }
  }
445252
public void close() throws IOException {
    LOG.info(getTask()+" done; removing files.");
    getTask().getProgress().setStatus("closed");
    mapOutputFile.removeAll(getTask().getTaskID());
  }
279697
public void close() throws IOException {
		if(inner instanceof CloseableIterator) {
			CloseableIterator<String> toBeClosed = (CloseableIterator<String>) inner;
			toBeClosed.close();
		}
	}
1373085
public void close() throws IOException {
    peeked = PEEKED_NONE;
    stack[0] = JsonScope.CLOSED;
    stackSize = 1;
    in.close();
  }