在本地文件系统(Java 中)上持久化 ACID 事务的简单方法是什么?

发布于 2024-08-25 15:12:51 字数 188 浏览 2 评论 0原文

我正在开发一个小型(java)项目,其中网站需要维护注册电子邮件地址的(最好是逗号分隔的)列表,仅此而已,并且能够检查地址是否在列表中。我无法控制托管或服务器缺乏数据库支持。

Prevayler 似乎是一个很好的解决方案,但该网站是一个鬼城,几乎所有应该存在的示例代码都丢失了,所以我有点警惕。

对于此类任务,还有哪些推荐选项?

I'm working on a small (java) project where a website needs to maintain a (preferably comma-separated) list of registered e-mail addresses, nothing else, and be able to check if an address is in the list. I have no control over the hosting or the server's lack of database support.

Prevayler seemed a good solution, but the website is a ghost town, with example code missing from just about everywhere it's supposed to be, so I'm a little wary.

What other options are recommended for such a task?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

丿*梦醉红颜 2024-09-01 15:12:51

使用嵌入式数据库,例如 HSQLDBH2Derby/JavaDB。它们不需要安装,并且可以使用简单的文件作为存储机制。

Use an embedded database like HSQLDB, H2 or Derby/JavaDB. They need no installation and can use simple files as their storage mechanism.

北渚 2024-09-01 15:12:51

是的,prevayler 及其历史并发 space4j 确实是这种简单案例的良好候选者。它们比 DB 简单得多,但提供了一些有用的概念并且速度很快(因为实际上 FS 只是内存中数据存储的备份。

Yeah, prevayler and its historical concurrent, space4j, are really good candidates for such a simple case. They're far simpler than DB, provides however some useful concepts and are way fast (since in fact FS is only a backup of the in-memory datastore.

萌面超妹 2024-09-01 15:12:51

您可能需要考虑 Berkeley DB

You may want to consider Berkeley DB.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文