use of com.bonree.brfs.schedulers.task.meta.SumbitTaskInterface in project BRFS by zhangnianli.
the class MetaTaskLeaderManager method createCheckCyclePool.
public void createCheckCyclePool() throws ParamsErrorException {
Properties prop = DefaultBaseSchedulers.createSimplePrope(1, 1000L);
boolean createFlag = this.manager.createTaskPool(COPY_CYCLE_POOL, prop);
if (!createFlag) {
LOG.warn("create check pool fail !!!!");
return;
}
boolean cFlag = this.manager.startTaskPool(COPY_CYCLE_POOL);
if (!cFlag) {
LOG.info("Follower will quiting !!!");
return;
}
Map content = JobDataMapConstract.createCylcCheckDataMap(this.config.getCheckTimeRange());
SumbitTaskInterface sumbit = QuartzCronInfo.getInstance("CYCLE_CHECK_JOB", "CYCLE_CHECK_JOB", this.config.getCheckCronStr(), content, CheckCycleJob.class);
cFlag = this.manager.addTask("COPY_CYCLE_POOL", sumbit);
LOG.info("sumbit Cycle task :{}", Boolean.valueOf(cFlag));
}
Aggregations