gpt4 book ai didi

java - 搜索通用异步 Java 作业执行框架/库

转载 作者:搜寻专家 更新时间:2023-10-31 08:13:06 25 4
gpt4 key购买 nike

我正在寻找可以处理 CallableRunnable 的通用异步 Java 作业执行框架。它类似于 java.util.concurrent.ExecutorService,(并且可能包装 ExecutorService),但它还具有以下特性:

  1. 能够将作业持久保存到数据库,以防应用程序在为作业提供服务时出现故障,并且能够重新启动未完成的作业。 (我知道我的工作可能必须实现 Serializable,这没问题。)

  2. 使用 UUID 使客户端能够获取作业 token 并查询作业状态。 (在幕后,这些信息也会保存到数据库中。)

我已经开始通过围绕 ExecutorService 构建自己来解决这个问题,但我更喜欢开箱即用的开源解决方案(如果存在的话)。

可以在 Spring Framework 中工作的东西是理想的。

最佳答案

你可能想看看Quartz .

Quartz is a full-featured, open source job scheduling system that can be integrated with, or used along side virtually any J2EE or J2SE application - from the smallest stand-alone application to the largest e-commerce system. Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks are defined as standard Java components or EJBs. The Quartz Scheduler includes many enterprise-class features, such as JTA transactions and clustering.

关于java - 搜索通用异步 Java 作业执行框架/库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/612656/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com