Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
dead06df
Commit
dead06df
authored
Feb 24, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加方法
parent
01afe49a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
FlowContentManager.java
...-core/src/main/java/com/byit/util/FlowContentManager.java
+21
-0
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/util/FlowContentManager.java
View file @
dead06df
...
@@ -11,20 +11,41 @@ public class FlowContentManager {
...
@@ -11,20 +11,41 @@ public class FlowContentManager {
//存储当前的调度中心运行了哪些工作流(key为工作流名称加runid)
//存储当前的调度中心运行了哪些工作流(key为工作流名称加runid)
private
static
HashMap
<
String
,
FlowContent
>
flowContentHashMap
=
new
HashMap
<>(
20
);
private
static
HashMap
<
String
,
FlowContent
>
flowContentHashMap
=
new
HashMap
<>(
20
);
/**
* 放置工作流运行内容
* @param flowKey
* @param flowContent
*/
public
static
synchronized
void
putFlowContent
(
String
flowKey
,
FlowContent
flowContent
){
public
static
synchronized
void
putFlowContent
(
String
flowKey
,
FlowContent
flowContent
){
flowContentHashMap
.
put
(
flowKey
,
flowContent
);
flowContentHashMap
.
put
(
flowKey
,
flowContent
);
}
}
/**
* 移除工作流运行内容
* @param flowKey
* @return
*/
public
static
synchronized
FlowContent
remove
(
String
flowKey
){
public
static
synchronized
FlowContent
remove
(
String
flowKey
){
FlowContent
flowContent
=
flowContentHashMap
.
remove
(
flowKey
);
FlowContent
flowContent
=
flowContentHashMap
.
remove
(
flowKey
);
return
flowContent
;
return
flowContent
;
}
}
/**
* 获取工作流运行内容
* @param flowKey
* @return
*/
public
static
synchronized
FlowContent
getFlowContent
(
String
flowKey
){
public
static
synchronized
FlowContent
getFlowContent
(
String
flowKey
){
FlowContent
flowContent
=
flowContentHashMap
.
get
(
flowKey
);
FlowContent
flowContent
=
flowContentHashMap
.
get
(
flowKey
);
return
flowContent
;
return
flowContent
;
}
}
/**
* 创建工作流运行内容主体
* @param flowKey
* @param allJobNum
* @return
*/
public
static
synchronized
FlowContent
createFlowContent
(
String
flowKey
,
Integer
allJobNum
){
public
static
synchronized
FlowContent
createFlowContent
(
String
flowKey
,
Integer
allJobNum
){
FlowContent
flowContent
=
new
FlowContent
(
flowKey
,
allJobNum
);
FlowContent
flowContent
=
new
FlowContent
(
flowKey
,
allJobNum
);
return
flowContent
;
return
flowContent
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment