hudson.model.Fingerprint.save()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(172)

本文整理了Java中hudson.model.Fingerprint.save()方法的一些代码示例,展示了Fingerprint.save()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fingerprint.save()方法的具体详情如下:
包路径:hudson.model.Fingerprint
类名称:Fingerprint
方法名:save

Fingerprint.save介绍

[英]Save the settings to a file.
[中]将设置保存到文件中。

代码示例

代码示例来源:origin: jenkinsci/jenkins

public Fingerprint(@CheckForNull Run build, @Nonnull String fileName, @Nonnull byte[] md5sum) throws IOException {
  this(build==null ? null : new BuildPtr(build), fileName, md5sum);
  save();
}

代码示例来源:origin: jenkinsci/jenkins

/**
 * Records that a build of a job has used this file.
 */
public synchronized void add(@Nonnull String jobFullName, int n) throws IOException {
  addWithoutSaving(jobFullName, n);
  save();
}

代码示例来源:origin: jenkinsci/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();
  }
}

代码示例来源:origin: jenkinsci/jenkins

/**
 * Save the settings to a file.
 * @throws IOException Save error
 */
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");
}

代码示例来源:origin: jenkinsci/jenkins

logger.log(Level.FINE, "Saving trimmed {0}", getFingerprintFile(md5sum));
save();

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public Fingerprint(Run build, String fileName, byte[] md5sum) throws IOException {
  this.original = build==null ? null : new BuildPtr(build);
  this.md5sum = md5sum;
  this.fileName = fileName;
  this.timestamp = new Date();
  save();
}

代码示例来源:origin: hudson/hudson-2.x

public Fingerprint(Run build, String fileName, byte[] md5sum) throws IOException {
  this.original = build==null ? null : new BuildPtr(build);
  this.md5sum = md5sum;
  this.fileName = fileName;
  this.timestamp = new Date();
  save();
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public Fingerprint(@CheckForNull Run build, @Nonnull String fileName, @Nonnull byte[] md5sum) throws IOException {
  this(build==null ? null : new BuildPtr(build), fileName, md5sum);
  save();
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * Records that a build of a job has used this file.
 */
public synchronized void add(@Nonnull String jobFullName, int n) throws IOException {
  addWithoutSaving(jobFullName, n);
  save();
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

public Fingerprint(Run build, String fileName, byte[] md5sum) throws IOException {
  this.original = build==null ? null : new BuildPtr(build);
  this.md5sum = md5sum;
  this.fileName = fileName;
  this.timestamp = new Date();
  save();
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

public Fingerprint(Run build, String fileName, byte[] md5sum) throws IOException {
  this.original = build == null ? null : new BuildPtr(build);
  this.md5sum = md5sum;
  this.fileName = fileName;
  this.timestamp = new Date();
  save();
}

代码示例来源:origin: jenkinsci/dockerhub-notification-plugin

public synchronized void save(@Nonnull final TriggerEntry entry) throws IOException, InterruptedException {
  entry.getFingerprint().save();
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Records that a build of a job has used this file.
 */
public synchronized void add(String jobFullName, int n) throws IOException {
  synchronized(usages) {
    RangeSet r = usages.get(jobFullName);
    if(r==null) {
      r = new RangeSet();
      usages.put(jobFullName,r);
    }
    r.add(n);
  }
  save();
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Records that a build of a job has used this file.
 */
public synchronized void add(String jobFullName, int n) throws IOException {
  synchronized(usages) {
    RangeSet r = usages.get(jobFullName);
    if(r==null) {
      r = new RangeSet();
      usages.put(jobFullName,r);
    }
    r.add(n);
  }
  save();
}

代码示例来源:origin: org.jenkins-ci.plugins/docker-commons

public void add(ContainerRecord r) throws IOException {
  for (ContainerRecord e : records) {
    if (e.equals(r))
      return;
  }
  records.add(r);
  getFingerprint().save();
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Records that a build of a job has used this file.
 */
public synchronized void add(String jobFullName, int n) throws IOException {
  synchronized(usages) {
    RangeSet r = usages.get(jobFullName);
    if(r==null) {
      r = new RangeSet();
      usages.put(jobFullName,r);
    }
    r.add(n);
  }
  save();
}

代码示例来源:origin: jenkinsci/docker-commons-plugin

/**
 * Records that a build of a job has used this file.
 */
public synchronized void add(String jobFullName, int n) throws IOException {
  addWithoutSaving(jobFullName, n);
  getFingerprint().save();
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Records that a build of a job has used this file.
 */
public synchronized void add(String jobFullName, int n) throws IOException {
  synchronized (usages) {
    RangeSet r = usages.get(jobFullName);
    if (r == null) {
      r = new RangeSet();
      usages.put(jobFullName, r);
    }
    r.add(n);
  }
  save();
}

代码示例来源:origin: jenkinsci/docker-commons-plugin

public void add(ContainerRecord r) throws IOException {
  for (ContainerRecord e : records) {
    if (e.equals(r))
      return;
  }
  records.add(r);
  getFingerprint().save();
}

代码示例来源:origin: org.jenkins-ci.plugins/docker-commons

/**
 * Records that a build of a job has used this file.
 */
public synchronized void add(String jobFullName, int n) throws IOException {
  addWithoutSaving(jobFullName, n);
  getFingerprint().save();
}

相关文章