コード例 #1
0
ファイル: Fingerprint.java プロジェクト: sslavic/jenkins
  /** Save the settings to a file. */
  public synchronized void save() throws IOException {
    if (BulkChange.contains(this)) return;

    long start = 0;
    if (logger.isLoggable(Level.FINE)) start = System.currentTimeMillis();

    File file = getFingerprintFile(md5sum);
    save(file);
    SaveableListener.fireOnChange(this, getConfigFile(file));

    if (logger.isLoggable(Level.FINE))
      logger.fine(
          "Saving fingerprint " + file + " took " + (System.currentTimeMillis() - start) + "ms");
  }
コード例 #2
0
ファイル: Fingerprint.java プロジェクト: sslavic/jenkins
  /** Update references to a renamed job in the fingerprint */
  public synchronized void rename(String oldName, String newName) throws IOException {
    boolean touched = false;
    if (original != null) {
      if (original.getName().equals(oldName)) {
        original.setName(newName);
        touched = true;
      }
    }

    if (usages != null) {
      RangeSet r = usages.get(oldName);
      if (r != null) {
        usages.put(newName, r);
        usages.remove(oldName);
        touched = true;
      }
    }

    if (touched) {
      save();
    }
  }
コード例 #3
0
ファイル: Fingerprint.java プロジェクト: sslavic/jenkins
 /** Records that a build of a job has used this file. */
 public synchronized void add(String jobFullName, int n) throws IOException {
   addWithoutSaving(jobFullName, n);
   save();
 }
コード例 #4
0
ファイル: Fingerprint.java プロジェクト: sslavic/jenkins
 public Fingerprint(Run build, String fileName, byte[] md5sum) throws IOException {
   this(build == null ? null : new BuildPtr(build), fileName, md5sum);
   save();
 }