I know I can just delete the directory. But is there a programmatically way to lets say do something like...



I am just trying a little tool to use MicroStream for deep copying Objects through the (unfortunately not yet standalone available) MicroStream serialization. The idea is:

- create datastore

- save file

- shutdown and restart datastore (so that the object is not loaded from the jvm memory)

- load object

- destroy the datastore and return the deep copy

In this example I didnt find a way to destroy "old" datastores in a API like way.


Currently there is no special API available to delete a storage. You can use the standard java API to delete the storage files and directories after you shut down the old storage.

Please be aware the storage must not contain lazy references if you create deep copies this way.

I tried to use java.io.file..

I assume it should also be possible to do this by an other way, but this was for me the shortest way to do it


private void btnDelDB_onClick(final ClickEvent<Button> event)
		// final dataRoot root = dbHandler.getRoot();
		final EmbeddedStorageManager storage = EmbeddedStorage.start();
		final dataRoot               root    = (dataRoot)storage.root();
		final File DBstorage = new File("C:/RC_MS_WS/FinMgmt/database");
		System.out.println("deleted database");

		final File bckStorage = new File("C:/RC_MS_WS/FinMgmt/databaseBck");
		System.out.println("deleted backup");

	catch(final Exception e)
		this.textAeraSysout.setValue("btnDelDB_onClick: generated error \n" + e.toString());


Thanks for your post. And sure, its possible this way. But I wonder if there are also plans for an API delete. For the cases where you use microstream as a fast temporary database for ...whatever you wanna do and then delete it again. :)

Hm I was double checking the page for a release date for standalone serialization. And noticed I didnt yet try 


and the stuff mentioned here:https://microstream.one/serialization

Maybe thats another thing I have to check for deep copy instead of using the full microsteam datastore.