package com.github.zengfr.project.stepchain.pipeline;
import java.util.Map;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.github.zengfr.project.stepchain.*;
import com.github.zengfr.project.stepchain.context.BinaryContext;
import com.github.zengfr.project.stepchain.context.DataContext;
import com.github.zengfr.project.stepchain.context.TernaryContext;
import com.github.zengfr.project.stepchain.context.UnaryContext;
import com.github.zengfr.project.stepchain.step.StepBuilder;
/**
* @author zengfr QQ:362505707/1163551688 Email:zengfr3000@qq.com
* https://github.com/zengfr/stepchain-spring-boot-starter
*/
@Component
public class Pipeline implements IPipeline {
@Autowired
protected IContextBuilder contextBuilder;
@Autowired
protected IChainBuilder chainBuilder;
@Autowired
protected StepBuilder stepBuilder;
@Autowired
protected IProcessorBuilder processorBuilder;
@Override
public <A, B> IChain<A, B> createChain(Function<A, B> func) {
return chainBuilder.createChain(func);
}
@Override
public <A, B> IChain<A, B> createChain(IProcessor<A, B> processor) {
return chainBuilder.createChain(processor);
}
@Override
public <A, B, C> IChain<A, C> createChain(Function<A, B> func1, Function<B, C> func2) {
return chainBuilder.createChain(func1, func2);
}
@Override
public <A, B, C> IChain<A, C> createChain(IProcessor<A, B> processor1, IProcessor<B, C> processor2) {
return chainBuilder.createChain(processor1, processor2);
}
@Override
public <A, B, C> IChain<A, C> createChain(IProcessor<A, B> processor, IChain<B, C> chain) {
return chainBuilder.createChain(processor, chain);
}
@Override
public <A, B, C> IChain<A, C> createChain(IChain<A, B> chain1, IChain<B, C> chain2) {
return chainBuilder.createChain(chain1, chain2);
}
@Override
public <A, B, C> IChain<A, C> createChain(IChain<A, B> chain, IProcessor<B, C> processor) {
return chainBuilder.createChain(chain, processor);
}
@Override
public <T> IStep<T> createStep() {
return stepBuilder.createStep();
}
@Override
public <T> IStep<T> createStep(int parallelCount) {
return stepBuilder.createStep(parallelCount);
}
@Override
public <T> IStep<T> createStep(String parallelCountConfigName) {
return stepBuilder.createStep(parallelCountConfigName);
}
@Override
public <I> IProcessor<I, Boolean> createProcessor(Predicate<I> predicate) {
return processorBuilder.createProcessor(predicate);
}
@Override
public <I> IProcessor<I, Boolean> createProcessor(Consumer<I> consumer) {
return processorBuilder.createProcessor(consumer);
}
@Override
public <I, O> IProcessor<I, O> createProcessor(Function<I, O> func) {
return processorBuilder.createProcessor(func);
}
@Override
public <A, B, C> IProcessor<A, C> createProcessor(IProcessor<A, B> first, IProcessor<B, C> second) {
return processorBuilder.createProcessor(first, second);
}
@Override
public <A, B, C, D> IProcessor<A, D> createProcessor(IProcessor<A, B> processor1, IProcessor<B, C> processor2, IProcessor<C, D> processor3) {
return processorBuilder.createProcessor(processor1, processor2, processor3);
}
@Override
public <I, O> IConditionLoopProcessor<I, O> createConditionLoopProcessor(IProcessor<I, Boolean> validator, IProcessor<I, O> processor) {
return processorBuilder.createConditionLoopProcessor(validator, processor);
}
@Override
public <I, O> IConditionValidatorProcessor<I, O> createConditionValidatorProcessor(IProcessor<I, Boolean> validator, IProcessor<I, O> trueProcessor, IProcessor<I, O> falseProcessor) {
return processorBuilder.createConditionValidatorProcessor(validator, trueProcessor, falseProcessor);
}
@Override
public <I, O> IConditionValidatorSelectorProcessor<I, O> createConditionValidatorSelectorProcessor() {
return processorBuilder.createConditionValidatorSelectorProcessor();
}
@Override
public <I, S, O> IConditionSelectorProcessor<I, S, O> createConditionSelectorProcessor(IProcessor<I, S> selector) {
return processorBuilder.createConditionSelectorProcessor(selector);
}
@Override
public <I, S, O> IConditionSelectorProcessor<I, S, O> createConditionSelectorProcessor(IProcessor<I, S> selector, Map<S, IProcessor<I, O>> branchs) {
return processorBuilder.createConditionSelectorProcessor(selector, branchs);
}
@Override
public <A> UnaryContext<A> createContext(A context) {
return contextBuilder.createContext(context);
}
@Override
public <A, B> BinaryContext<A, B> createContext(A input, B output) {
return contextBuilder.createContext(input, output);
}
@Override
public <A, B, C> DataContext<A, B, C> createContext(A left, B middle, C right) {
return contextBuilder.createContext(left, middle, right);
}
@Override
public <A, B, C> DataContext<A, B, C> createContext() {
return contextBuilder.createContext();
}
@Override
public <I, O> IProcessor<I, O> createScheduledFixedDelayProcessor(IProcessor<I, O> processor, Long milliseconds) {
return processorBuilder.createScheduledFixedDelayProcessor(processor, milliseconds);
}
@Override
public <I, O> IProcessor<I, O> createScheduledFixedRateProcessor(IProcessor<I, O> processor, Long milliseconds) {
return processorBuilder.createScheduledFixedRateProcessor(processor, milliseconds);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
stepchain 通用业务流程流水线处理框架
共81个文件
java:66个
jpg:5个
xml:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 105 浏览量
2023-06-27
09:33:05
上传
评论
收藏 705KB ZIP 举报
温馨提示
stepchain 通用业务流程流水线处理框架。 类似于Commons Chain和Commons Pipeline这样的Java Pipeline Step Chain用于组织复杂处理流程执行的流行技术。支持通用业务job、services子流程无限制拆分。支持业务子流程串行化、业务子流程并行化,可配置化。支持Config业务子流程开启或禁用、配置串行或并行以及并行数的统一配置。支持业务流程以及子流程任意无限嵌套。支持配置中心、缓存、统一数据接口、redis、Es、日志Trace等。支持并行分支,支持条件分支if/else、switch、loop子流程。支持Processor定时调度FixedRate、FixedDelay。全开源,请按Apache-2.0协议,商业使用无任何限制.
资源推荐
资源详情
资源评论
收起资源包目录
stepchain-master.zip (81个子文件)
stepchain-master
stepchain
pom.xml 901B
src
test
java
com
github
zengfr
project
stepchain
test
SetProductRequest.java 152B
processor
FeeProcessor.java 752B
TaxProcessor.java 752B
InitProcessor.java 807B
IncreaseProcessor.java 772B
DiscountProcessor.java 776B
PipelineTest.java 4KB
context
SetProductDataMiddle.java 143B
DataMiddle.java 263B
SetProductContext.java 494B
SetProductResponse.java 120B
main
resources
zengfr-stepchain.png 264KB
pipeline.jpg 57KB
stepchain-javadoc.PNG 55KB
chain.jpg 29KB
zengfr-stepchain.jpg 208KB
processor.jpg 94KB
META-INF
spring.factories 0B
step.jpg 41KB
java
com
github
zengfr
project
stepchain
IExecuteHandler.java 347B
IConditionValidatorSelectorProcessor.java 282B
executor
StepAsyncExecutor.java 2KB
ThreadPoolFactory.java 1KB
StepSyncExecutor.java 1KB
IStepProcessor.java 256B
IConditionSelectorProcessor.java 273B
step
StepBuilder.java 932B
Step.java 4KB
processor
ScheduledFixedDelayProcessor.java 909B
ConditionSelectorProcessor.java 1KB
FunctionProcessor.java 578B
EmptyStepProcessor.java 422B
ConsumerProcessor.java 466B
AbstractScheduledProcessor.java 2KB
EmptyProcessor.java 416B
ConditionValidatorSelectorProcessor.java 1KB
ProcessorBuilder.java 4KB
ConditionLoopProcessor.java 960B
CompositeProcessor.java 717B
ScheduledFixedRateProcessor.java 800B
ConditionValidatorProcessor.java 281B
PredicateProcessor.java 603B
IStep.java 1KB
pipeline
Pipeline.java 5KB
context
TernaryContext.java 372B
ContextBuilder.java 684B
UnaryContext.java 278B
DataContext.java 244B
BinaryContext.java 321B
IContext.java 78B
IConditionValidatorProcessor.java 157B
IProcessorBuilder.java 2KB
IHandler.java 222B
IPipeline.java 410B
AbstractProcessor.java 784B
IProcessor.java 294B
IContextBuilder.java 542B
IChainBuilder.java 806B
IStepBuilder.java 354B
IExceptionHandler.java 317B
IExecutor.java 327B
IChain.java 545B
IStepExecutor.java 249B
package-info.java 372B
util
ProcessorUtil.java 2KB
chain
Chain.java 1KB
ChainBuilder.java 2KB
IConfig.java 468B
IConditionLoopProcessor.java 221B
config
MemoryConfig.java 1KB
AbstractStepProcessor.java 1KB
.gitignore 21B
LICENSE 11KB
stepchain-spring-boot-starter
pom.xml 2KB
src
test
java
com
github
zengfr
project
stepchain
test
StepChainTestApplication.java 457B
StepChainSpringBootTest.java 718B
main
resources
application.properties 2KB
META-INF
spring.factories 132B
java
com
github
zengfr
project
stepchain
spring
StepChainAutoConfiguration.java 783B
.gitignore 21B
共 81 条
- 1
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 7363
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C#ASP.NET大型商城系统源码带数据库文档数据库 SQL2008源码类型 WebForm
- (全新整理)中国高校各专业录取分数线、招生计划、分段表数据(2008-2023年)
- 服务端开发复习资料MyBatis与Spring框架
- 中国A股上市公司真实盈余管理REM计算数据(2000-2023年)
- 嵌入式系统开发.docx
- 服务端后端开发复习资料:主流框架详解及应用 - Spring与MyBatis深入剖析
- AI程序源码最新,chat程序源码,支持多个国家语言
- C#ASP.NET自动排课系统源码 大学自动排课系统源码数据库 SQL2008源码类型 WebForm
- mysql数据库项目.docx
- 基于MATLAB的常用智能算法源码及案例
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功