本文整理了Java中hudson.model.Job._getRuns()
方法的一些代码示例,展示了Job._getRuns()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job._getRuns()
方法的具体详情如下:
包路径:hudson.model.Job
类名称:Job
方法名:_getRuns
[英]Gets all the runs. The resulting map must be immutable (by employing copy-on-write semantics.) The map is descending order, with newest builds at the top.
[中]获得所有跑步记录。结果映射必须是不可变的(通过采用写时复制语义)地图按降序排列,最新版本位于顶部。
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets all the builds in a map.
*/
public SortedMap<Integer, RunT> getBuildsAsMap() {
return Collections.<Integer, RunT>unmodifiableSortedMap(_getRuns());
}
代码示例来源:origin: jenkinsci/jenkins
/**
* @param n
* The build number.
* @return null if no such build exists.
* @see Run#getNumber()
* @see LazyBuildMixIn#getBuildByNumber
*/
public RunT getBuildByNumber(int n) {
return _getRuns().get(n);
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the latest build #m that satisfies {@code m<=n}.
*
* This is useful when you'd like to fetch a build but the exact build might
* be already gone (deleted, rotated, etc.)
* @see LazyBuildMixIn#getNearestOldBuild
*/
public RunT getNearestOldBuild(int n) {
SortedMap<Integer, ? extends RunT> m = _getRuns().tailMap(n);
if (m.isEmpty())
return null;
return m.get(m.firstKey());
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the youngest build #m that satisfies {@code n<=m}.
*
* This is useful when you'd like to fetch a build but the exact build might
* be already gone (deleted, rotated, etc.)
* @see LazyBuildMixIn#getNearestBuild
*/
public RunT getNearestBuild(int n) {
SortedMap<Integer, ? extends RunT> m = _getRuns().headMap(n - 1); // the map should
// include n, so n-1
if (m.isEmpty())
return null;
return m.get(m.lastKey());
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Looks up a build by its ID.
* @see LazyBuildMixIn#getBuild
*/
public RunT getBuild(String id) {
for (RunT r : _getRuns().values()) {
if (r.getId().equals(id))
return r;
}
return null;
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Returns the last build.
* @see LazyBuildMixIn#getLastBuild
*/
@Exported
@QuickSilver
public RunT getLastBuild() {
SortedMap<Integer, ? extends RunT> runs = _getRuns();
if (runs.isEmpty())
return null;
return runs.get(runs.firstKey());
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Returns the oldest build in the record.
* @see LazyBuildMixIn#getFirstBuild
*/
@Exported
@QuickSilver
public RunT getFirstBuild() {
SortedMap<Integer, ? extends RunT> runs = _getRuns();
if (runs.isEmpty())
return null;
return runs.get(runs.lastKey());
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the read-only view of all the builds.
*
* @return never null. The first entry is the latest build.
*/
@Exported(name="allBuilds",visibility=-2)
@WithBridgeMethods(List.class)
public RunList<RunT> getBuilds() {
return RunList.<RunT>fromRuns(_getRuns().values());
}
代码示例来源:origin: jenkinsci/jenkins
SortedMap<Integer, ? extends RunT> runs = _getRuns();
if (runs instanceof RunMap) {
RunMap<RunT> runMap = (RunMap<RunT>) runs;
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets all the builds in a map.
*/
public SortedMap<Integer, RunT> getBuildsAsMap() {
return Collections.<Integer, RunT>unmodifiableSortedMap(_getRuns());
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Gets all the builds in a map.
*/
public SortedMap<Integer, RunT> getBuildsAsMap() {
return Collections.unmodifiableSortedMap(_getRuns());
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* @param n
* The build number.
* @return null if no such build exists.
* @see Run#getNumber()
*/
public RunT getBuildByNumber(int n) {
return _getRuns().get(n);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* @param n The build number.
* @return null if no such build exists.
* @see Run#getNumber()
*/
public RunT getBuildByNumber(int n) {
return _getRuns().get(n);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the youngest build #m that satisfies <tt>n<=m</tt>.
*
* This is useful when you'd like to fetch a build but the exact build might
* be already gone (deleted, rotated, etc.)
*/
public final RunT getNearestBuild(int n) {
SortedMap<Integer, ? extends RunT> m = _getRuns().headMap(n - 1); // the map should
// include n, so n-1
if (m.isEmpty())
return null;
return m.get(m.lastKey());
}
代码示例来源:origin: hudson/hudson-2.x
/**
* @deprecated since 2008-06-15.
* This is only used to support backward compatibility with old URLs.
*/
@Deprecated
public RunT getBuild(String id) {
for (RunT r : _getRuns().values()) {
if (r.getId().equals(id))
return r;
}
return null;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns the oldest build in the record.
*/
@Exported
@QuickSilver
public RunT getFirstBuild() {
SortedMap<Integer, ? extends RunT> runs = _getRuns();
if (runs.isEmpty())
return null;
return runs.get(runs.lastKey());
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Returns the last build.
*/
@Exported
@QuickSilver
public RunT getLastBuild() {
SortedMap<Integer, ? extends RunT> runs = _getRuns();
if (runs.isEmpty())
return null;
return runs.get(runs.firstKey());
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the read-only view of all the builds.
*
* @return never null. The first entry is the latest build.
*/
@Exported
@WithBridgeMethods(List.class)
public RunList<RunT> getBuilds() {
return RunList.fromRuns(_getRuns().values());
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the read-only view of all the builds.
*
* @return never null. The first entry is the latest build.
*/
@Exported(name="allBuilds",visibility=-2)
@WithBridgeMethods(List.class)
public RunList<RunT> getBuilds() {
return RunList.<RunT>fromRuns(_getRuns().values());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets the read-only view of all the builds.
*
* @return never null. The first entry is the latest build.
*/
@Exported
@WithBridgeMethods(List.class)
public RunList<RunT> getBuilds() {
return RunList.fromRuns(_getRuns().values());
}
内容来源于网络,如有侵权,请联系作者删除!