jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.91k stars 873 forks source link

autocommit #767

Open jankotek opened 8 years ago

jankotek commented 8 years ago

I'm creating database with that code DBMaker.fileDB("database").transactionEnable().closeOnJvmShutdown().make(); I want that the mapDB save changes to disk automatic But when I restart the program, seeing that the changes not saved Is there an option for auto commit?

McPringle commented 7 years ago

I implemented an AutoCommitMap which is basically just a wrapper that calls db.commit() after each write operation. Maybe I'll try to add this to MapDB itself and see what @jankotek thinks about it.