Class MutableGraphCache
java.lang.Object
com.aizuda.snailjob.server.job.task.support.cache.MutableGraphCache
- Since:
- 2.6.0
- Author:
- xiaowoniu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.graph.MutableGraph<Long>根据给定的workflowBatchId获取图对象。getAllDescendants(com.google.common.graph.MutableGraph<Long> graph, Long parentId) getBrotherNode(com.google.common.graph.MutableGraph<Long> graph, Long nodeId) 获取所有的叶子节点static com.google.common.graph.MutableGraph<Long>getOrDefault(Long workflowBatchId, String jsonGraph) 获取指定workflowBatchId的可变图对象,若图对象不存在则使用给定的jsonGraph反序列化生成新的图对象并返回
-
Constructor Details
-
MutableGraphCache
public MutableGraphCache()
-
-
Method Details
-
getOrDefault
public static com.google.common.graph.MutableGraph<Long> getOrDefault(Long workflowBatchId, String jsonGraph) 获取指定workflowBatchId的可变图对象,若图对象不存在则使用给定的jsonGraph反序列化生成新的图对象并返回- Parameters:
workflowBatchId- 工作流批次IDjsonGraph- JSON格式的图对象字符串- Returns:
MutableGraph图对象
-
get
根据给定的workflowBatchId获取图对象。- Parameters:
workflowBatchId- 工作流批次ID- Returns:
MutableGraph返回对应的图对象,如果不存在则返回空图
-
getLeaves
获取所有的叶子节点- Parameters:
workflowBatchId- 工作流批次IDjsonGraph- JSON格式的图对象字符串- Returns:
- 叶子节点
-
getAllDescendants
-
getBrotherNode
-