Skip to content

Is there a way to force Microstream to load Lazy References? #261

Answered by hg-ms
Sandared asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

the LazyReferenceManager has an iterate method that iterates over all registered LazyReferences.
you could use this method to load all lazy references.

Optionally you can also deactivate the LazyReferenceManager at any time after starting the storage to prevent it from clearing LazyReferences automatically if necessary.

final EmbeddedStorageManager storage = EmbeddedStorage.start();
LazyReferenceManager.get().iterate( lazyRef -> lazyRef.get());
LazyReferenceManager.get().stop();

Best regards

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sandared
Comment options

Answer selected by Sandared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants