Skip to content

[storer] retrieve stored object list pre commit #670

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

You must be logged in to vote

Hi,

there is one.microstream.persistence.types.PersistenceLocalObjectIdRegistry.iterateMergeableEntries(PersistenceAcceptor) which is implemented by our default storers. As it is not part of the one.microstream.persistence.types.Storer interface you need to cast the storer instance to PersistenceLocalObjectIdRegistry or to the storer implementation itself e.g. one.microstream.persistence.binary.types.BinaryStorer.Default

final BinaryStorer.Default storer = (BinaryStorer.Default)storage.createLazyStorer();

storer.store(...);
storer.iterateMergeableEntries(
	(id, object) ->
	System.out.println("id: " + id + " object: " + object.getClass()));
storer.commit();

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@guykatz
Comment options

@hg-ms
Comment options

Answer selected by guykatz
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