@Override public boolean checkDistribution(Distribution distribution) throws IOException { return delegate.checkDistribution(distribution); }
public synchronized IExtractedFileSet use() throws IOException { _counter++; if (_file==null) { _file=_delegate.extractFileSet(_distribution); _logger.debug("Not Cached {} {}", _counter, _file); } else { _logger.debug("Cached {} {}", _counter, _file); } return _file; }
public synchronized void forceDelete() { if (file !=null) { logger.debug("force delete for {} and {}", distribution, file); delegate.removeFileSet(distribution, file); file =null; counter =0; } } }
public EXECUTABLE prepare(CONFIG config, Distribution distribution) { try { IArtifactStore artifactStore = runtime.getArtifactStore(); if (artifactStore.checkDistribution(distribution)) { ExtractedFileSet files = runtime.getArtifactStore().extractFileSet(distribution); return newExecutable(config, distribution, runtime, files); } else { throw new DistributionException("could not find Distribution",distribution); } } catch (IOException iox) { String messageOnException = config.supportConfig().messageOnException().apply(getClass(), iox); if (messageOnException==null) { messageOnException="prepare executable"; } logger.error(messageOnException, iox); throw new DistributionException(distribution,iox); } }
public EXECUTABLE prepare(CONFIG config, Distribution distribution) throws DistributionException { try { IArtifactStore artifactStore = runtime.getArtifactStore(); if (artifactStore.checkDistribution(distribution)) { IExtractedFileSet files = runtime.getArtifactStore().extractFileSet(distribution); return newExecutable(config, distribution, runtime, files); } else { throw new DistributionException("could not find Distribution",distribution); } } catch (IOException iox) { String messageOnException = config.supportConfig().messageOnException(getClass(), iox); if (messageOnException==null) { messageOnException="prepare executable"; } throw new DistributionException(messageOnException, distribution,iox); } }
public synchronized void forceDelete() { if (_file!=null) { _logger.debug("force delete for {} and {}", _distribution, _file); _delegate.removeFileSet(_distribution, _file); _file=null; _counter=0; } } }
public synchronized ExtractedFileSet use() throws IOException { counter++; if (file ==null) { file = delegate.extractFileSet(distribution); logger.debug("Not Cached {} {}", counter, file); } else { logger.debug("Cached {} {}", counter, file); } return file; }
@Override public boolean checkDistribution(Distribution distribution) throws IOException { return _delegate.checkDistribution(distribution); }
public synchronized void cleanup() { if (_counter<=0) { if (_counter<0) _logger.warn("Counter < 0 for {} and {}", _distribution, _file); if (_file!=null) { _logger.debug("cleanup for {} and {}", _distribution, _file); _delegate.removeFileSet(_distribution, _file); _file=null; } } }
public synchronized void cleanup() { if (counter <=0) { if (counter <0) logger.warn("Counter < 0 for {} and {}", distribution, file); if (file !=null) { logger.debug("cleanup for {} and {}", distribution, file); delegate.removeFileSet(distribution, file); file =null; } } }
public synchronized void stop() { if (!stopped) { for (IStopable s : stopables) { s.stop(); } stopables = new ArrayList<IStopable>(); runtimeConfig.getArtifactStore().removeFileSet(distribution, executable); stopped = true; } }
public synchronized void stop() { if (!stopped) { for (IStopable s : stopables) { s.stop(); } stopables = new ArrayList<>(); runtimeConfig.getArtifactStore().removeFileSet(distribution, executable); stopped = true; } }