@Override public IExtractedFileSet extractFileSet(Distribution distribution) throws IOException { FilesWithCounter fileWithCounter; synchronized (_lock) { fileWithCounter = _distributionFiles.get(distribution); if (fileWithCounter == null) { _logger.debug("cache NOT found for {}", distribution); fileWithCounter = new FilesWithCounter(distribution); _distributionFiles.put(distribution, fileWithCounter); } else { _logger.debug("cache found for {}", distribution); } } return fileWithCounter.use(); }
protected void removeAll() { synchronized (lock) { for (FilesWithCounter fc : distributionFiles.values()) { fc.forceDelete(); } distributionFiles.clear(); } }
@Override public void removeFileSet(Distribution distribution, ExtractedFileSet executable) { FilesWithCounter fileWithCounter; synchronized (lock) { fileWithCounter = distributionFiles.get(distribution); } if (fileWithCounter != null) { fileWithCounter.free(executable); } else { logger.warn("Already removed {} for {}, emergency shutdown?", executable, distribution); } }
@Override public ExtractedFileSet extractFileSet(Distribution distribution) throws IOException { FilesWithCounter fileWithCounter; synchronized (lock) { fileWithCounter = distributionFiles.get(distribution); if (fileWithCounter == null) { logger.debug("cache NOT found for {}", distribution); fileWithCounter = new FilesWithCounter(distribution); distributionFiles.put(distribution, fileWithCounter); } else { logger.debug("cache found for {}", distribution); } } return fileWithCounter.use(); }
public void removeUnused() { synchronized (lock) { for (FilesWithCounter fc : distributionFiles.values()) { fc.cleanup(); } } }
@Override public void removeFileSet(Distribution distribution, IExtractedFileSet executable) { FilesWithCounter fileWithCounter; synchronized (_lock) { fileWithCounter = _distributionFiles.get(distribution); } if (fileWithCounter != null) { fileWithCounter.free(executable); } else { _logger.warn("Already removed {} for {}, emergency shutdown?", executable, distribution); } }
public void removeUnused() { synchronized (_lock) { for (FilesWithCounter fc : _distributionFiles.values()) { fc.cleanup(); } } }
protected void removeAll() { synchronized (_lock) { for (FilesWithCounter fc : _distributionFiles.values()) { fc.forceDelete(); } _distributionFiles.clear(); } }