-
Notifications
You must be signed in to change notification settings - Fork 210
/
PowerjobTriggerBuildResult.java
78 lines (65 loc) · 2.54 KB
/
PowerjobTriggerBuildResult.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p>
* http:https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qlangtech.tis.coredefine.module.action;
import com.alibaba.fastjson.JSONObject;
import com.qlangtech.tis.job.common.JobParams;
import com.qlangtech.tis.plugin.PluginAndCfgsSnapshotUtils;
import java.util.Objects;
/**
* @author 百岁 ([email protected])
* @date 2023/12/11
*/
public class PowerjobTriggerBuildResult extends TriggerBuildResult {
private String pluginCfgsMetas;
/**
* 用于Crontab任务传递的参数
*/
private String javaMemorySpec;
/**
* 前一次执行的taskId,初次执行时为空
*/
private Integer previousTaskId;
public PowerjobTriggerBuildResult() {
}
public PowerjobTriggerBuildResult(boolean success, JSONObject instanceParams) {
super(success);
// JSONObject instanceParams = Objects.requireNonNull(instanceParamsRef).get();
pluginCfgsMetas = Objects.requireNonNull(instanceParams, "instanceParams can not be null") //
.getString(PluginAndCfgsSnapshotUtils.KEY_PLUGIN_CFGS_METAS);
this.javaMemorySpec = instanceParams.getString(JobParams.KEY_JAVA_MEMORY_SPEC);
this.previousTaskId = instanceParams.getInteger(JobParams.KEY_PREVIOUS_TASK_ID);
}
public Integer getPreviousTaskId() {
return previousTaskId;
}
public void setPreviousTaskId(Integer previousTaskId) {
this.previousTaskId = previousTaskId;
}
public String getJavaMemorySpec() {
return javaMemorySpec;
}
public void setJavaMemorySpec(String javaMemorySpec) {
this.javaMemorySpec = javaMemorySpec;
}
public String getPluginCfgsMetas() {
return pluginCfgsMetas;
}
public void setPluginCfgsMetas(String pluginCfgsMetas) {
this.pluginCfgsMetas = pluginCfgsMetas;
}
}