protected Fingerprint loadFingerprint(File fingerprintFile) throws IOException { return Fingerprint.load(fingerprintFile); }
/** * Loads a {@link Fingerprint} from a file in the image. * @return Loaded {@link Fingerprint}. Null if the config file does not exist or * malformed. */ /*package*/ static @CheckForNull Fingerprint load(@Nonnull byte[] md5sum) throws IOException { return load(getFingerprintFile(md5sum)); } /*package*/ static @CheckForNull Fingerprint load(@Nonnull File file) throws IOException {
protected @CheckForNull Fingerprint load(@Nonnull String key) throws IOException { return Fingerprint.load(toByteArray(key)); }
/** * Loads a {@link Fingerprint} from a file in the image. */ /*package*/ static Fingerprint load(byte[] md5sum) throws IOException { return load(getFingerprintFile(md5sum)); } /*package*/ static Fingerprint load(File file) throws IOException {
/** * Loads a {@link Fingerprint} from a file in the image. */ /*package*/ static Fingerprint load(byte[] md5sum) throws IOException { return load(getFingerprintFile(md5sum)); } /*package*/ static Fingerprint load(File file) throws IOException {
/** * Loads a {@link Fingerprint} from a file in the image. */ /*package*/ static Fingerprint load(byte[] md5sum) throws IOException { return load(getFingerprintFile(md5sum)); } /*package*/ static Fingerprint load(File file) throws IOException {
/** * Loads a {@link Fingerprint} from a file in the image. * @return Loaded {@link Fingerprint}. Null if the config file does not exist or * malformed. */ /*package*/ static @CheckForNull Fingerprint load(@Nonnull byte[] md5sum) throws IOException { return load(getFingerprintFile(md5sum)); } /*package*/ static @CheckForNull Fingerprint load(@Nonnull File file) throws IOException {
/** * Loads a {@link Fingerprint} from a file in the image. */ /*package*/ static Fingerprint load(byte[] md5sum) throws IOException { return load(getFingerprintFile(md5sum)); } /*package*/ static Fingerprint load(File file) throws IOException {
protected @CheckForNull Fingerprint load(@Nonnull String key) throws IOException { return Fingerprint.load(toByteArray(key)); }
protected Fingerprint load(String key) throws IOException { return Fingerprint.load(toByteArray(key)); }
protected Fingerprint load(String key) throws IOException { return Fingerprint.load(toByteArray(key)); }
/** * Examines the file and returns true if a file was deleted. */ private boolean check(File fingerprintFile) { try { Fingerprint fp = Fingerprint.load(fingerprintFile); if(!fp.isAlive()) { fingerprintFile.delete(); return true; } } catch (IOException e) { logger.log(Level.WARNING, "Failed to process "+fingerprintFile, e); } return false; }
protected Fingerprint load(String key) throws IOException { return Fingerprint.load(toByteArray(key)); }
protected Fingerprint load(String key) throws IOException { return Fingerprint.load(toByteArray(key)); }
/** * Examines the file and returns true if a file was deleted. */ private boolean check(File fingerprintFile) { try { Fingerprint fp = Fingerprint.load(fingerprintFile); if(!fp.isAlive()) { fingerprintFile.delete(); return true; } } catch (IOException e) { logger.log(Level.WARNING, "Failed to process "+fingerprintFile, e); } return false; }
/** * Examines the file and returns true if a file was deleted. */ private boolean check(File fingerprintFile) { try { Fingerprint fp = Fingerprint.load(fingerprintFile); if (!fp.isAlive()) { fingerprintFile.delete(); return true; } } catch (IOException e) { logger.log(Level.WARNING, "Failed to process " + fingerprintFile, e); } return false; } private static final FileFilter LENGTH2DIR_FILTER = new FileFilter() {
/** * Examines the file and returns true if a file was deleted. */ private boolean check(File fingerprintFile) { try { Fingerprint fp = Fingerprint.load(fingerprintFile); if(!fp.isAlive()) { fingerprintFile.delete(); return true; } } catch (IOException e) { logger.log(Level.WARNING, "Failed to process "+fingerprintFile, e); } return false; }
/** * Examines the file and returns true if a file was deleted. */ private boolean check(File fingerprintFile, TaskListener listener) { try { Fingerprint fp = Fingerprint.load(fingerprintFile); if (fp == null || !fp.isAlive()) { listener.getLogger().println("deleting obsolete " + fingerprintFile); fingerprintFile.delete(); return true; } else { // get the fingerprint in the official map so have the changes visible to Jenkins // otherwise the mutation made in FingerprintMap can override our trimming. listener.getLogger().println("possibly trimming " + fingerprintFile); fp = Jenkins.getInstance()._getFingerprint(fp.getHashString()); return fp.trim(); } } catch (IOException e) { Functions.printStackTrace(e, listener.error("Failed to process " + fingerprintFile)); return false; } }