java-延时执行-参数-任务

定义任务

成都创新互联公司于2013年成立,是专业互联网技术服务公司,拥有项目成都网站设计、成都网站建设网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元太和做网站,已为上家服务,为太和各地企业和个人服务,联系电话:028-86922220

ScheduledExecutorService scheduledExecutorService =
Executors.newScheduledThreadPool(50);
scheduledExecutorService.schedule(new DoorGuardDelUserThreadPool(vd,companyDao,preRegistrationDataDao,doorGuardService,c.getDomain()), 10*60, TimeUnit.SECONDS);

写执行内容:实现 Runnable接口@Slf4j
br/>@Slf4j
private VisitorData finalVd;

private ICompanyDao companyDao;

private IPreRegistrationDataDao preRegistrationDataDao;

private IDoorGuardService doorGuardService;

private String domain;

public DoorGuardDelUserThreadPool(VisitorData vd, ICompanyDao companyDao, IPreRegistrationDataDao preRegistrationDataDao, IDoorGuardService doorGuardService,String domain) {
this.finalVd = vd;
this.companyDao = companyDao;
this.preRegistrationDataDao = preRegistrationDataDao;
this.doorGuardService = doorGuardService;
this.domain = domain;
}

@Override
public void run() {
log.info("companyDao:"+companyDao);
log.info("finalVd.getCompany_id():"+finalVd.getCompany_id());
log.info("finalVd.getPre_registration_id() :"+finalVd.getPre_registration_id() );
log.info("domain :"+domain );

}


分享文章:java-延时执行-参数-任务
网站路径:http://bzwzjz.com/article/geiiec.html

其他资讯

Copyright © 2007-2020 广东宝晨空调科技有限公司 All Rights Reserved 粤ICP备2022107769号
友情链接: 高端网站设计 重庆企业网站建设 成都定制网站建设 成都网站设计公司 成都网站设计 成都网站建设 外贸营销网站建设 成都网站建设 手机网站制作 高端品牌网站建设 网站制作 成都网站设计 企业网站建设 定制网站建设多少钱 企业网站设计 成都网站设计 外贸网站设计方案 成都品牌网站建设 网站建设 网站设计制作报价 成都网站建设 成都网站制作