cn.schoolwow.data.thread.flow.work.ExecuteSingleWorkFlow Maven / Gradle / Ivy
package cn.schoolwow.data.thread.flow.work;
import cn.schoolwow.data.thread.domain.DataThreadProgress;
import cn.schoolwow.data.thread.flow.handler.WorkTryCatchFinallyHandler;
import cn.schoolwow.data.thread.work.single.SingleDataThreadHandler;
import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.quickflow.flow.FunctionFlow;
import java.util.List;
import java.util.concurrent.ThreadPoolExecutor;
public class ExecuteSingleWorkFlow implements BusinessFlow {
@Override
public void executeBusinessFlow(FlowContext flowContext) throws Exception {
ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) flowContext.checkData("threadPoolExecutor");
List list = (List) flowContext.checkData("list");
SingleDataThreadHandler singleDataThreadHandler = (SingleDataThreadHandler) flowContext.checkData("singleDataThreadHandler");
DataThreadProgress dataThreadProgress = (DataThreadProgress) flowContext.checkData("dataThreadProgress");
dataThreadProgress.total = list.size();
dataThreadProgress.type = "Single";
for(int i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy