EmbeddedStorage.root()
.
Therefore, this is already a fully fledged (although tiny) database application:.start();
:storageManager.root();
automatically chooses the variant that is used. Since neither of those three methods can know the concrete type of the root instance (and adding a type parameter just for that would have been a complication overkill), they all can only be typed to return Object. So, to avoid annoying and dangerous casts, it is best to keep a direct reference to a custom root instance as shown in the code snippet above.storageManager.storeRoot();
works for both variants, so there is no need to worry about how to store which one.