Open wenyue opened 3 days ago
Can you elaborate on what cases need this? Also what would this feature do exactly?
For example, before exiting the program, we need to make sure that all the data has been written to the hard disk. We now have a Hive.close() method, but this method call will close all boxes. This needs to ensure that we do not hold a reference to box, it is very difficult to use.
Or can you provide a way to get all the boxes?
Isn't all data persisted immediately? Have you ever lost data because of this?
Yes, the data is persisted immediately, but I need to make sure that the persistence is complete and not exited on persistence
Persisting the data should take almost zero seconds. What would cause the app to quit during that time? Where would you call this method?
Also you could store references to all the futures of write operations and await them. That would basically be what a flush method would be.
Can we provide the flush api? This needs to be used in some cases.
Version