Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
e0f6d476
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e0f6d476
编写于
11月 02, 2011
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
expanding the contract to improve the usability of LabelAssignmentAction
上级
8affa6d9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
2 deletion
+19
-2
core/src/main/java/hudson/model/Queue.java
core/src/main/java/hudson/model/Queue.java
+6
-2
core/src/main/java/hudson/model/labels/LabelAssignmentAction.java
.../main/java/hudson/model/labels/LabelAssignmentAction.java
+13
-0
未找到文件。
core/src/main/java/hudson/model/Queue.java
浏览文件 @
e0f6d476
...
...
@@ -1365,14 +1365,18 @@ public class Queue extends ResourceController implements Saveable {
* to the queue, and the task will never get executed.
*
* <p>
* Th
is extension point is still a subject to change, as we are seeking more
*
comprehensive Queue pluggability. See HUDSON-2072
.
* Th
e other use case is to add additional {@link Action}s to the task
*
(for example {@link LabelAssignmentAction}) to tasks that are submitted to the queue
.
*
* @since 1.316
*/
public
static
abstract
class
QueueDecisionHandler
implements
ExtensionPoint
{
/**
* Returns whether the new item should be scheduled.
*
* @param actions
* List of actions that are to be made available as {@link AbstractBuild#getActions()}
* upon the start of the build. This list is live, and can be mutated.
*/
public
abstract
boolean
shouldSchedule
(
Task
p
,
List
<
Action
>
actions
);
...
...
core/src/main/java/hudson/model/labels/LabelAssignmentAction.java
浏览文件 @
e0f6d476
...
...
@@ -2,13 +2,26 @@ package hudson.model.labels;
import
hudson.model.Action
;
import
hudson.model.Label
;
import
hudson.model.LoadBalancer
;
import
hudson.model.Queue
;
import
hudson.model.Queue.QueueDecisionHandler
;
import
hudson.model.Queue.Task
;
import
hudson.model.queue.SubTask
;
/**
* {@link Action} that can be submitted to {@link Queue} that controls where
* the task runs.
*
* <h2>Where to insert {@link LabelAssignmentAction}s</h2>
* <p>
* If you control when the task gets submitted to the queue, you can associate this action
* to the task by passing it as a parameter to method like {@link Queue#schedule(Task, int, Action...)}.
*
* <p>
* If you want to globally affect the scheduling decision, you can do so by {@link QueueDecisionHandler}
* and alter the list of actions that you get. Alternatively, you can implement your own {@link LoadBalancer}
* and bypass the whole label/assignment mechanism to control the decision into your own hands.
*
* @author Kohsuke Kawaguchi
* @since 1.416
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录