Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide map interface for kv store - clojure.lang.IPersistentMap or java.util.Map ?! #109

Open
ieugen opened this issue Apr 20, 2022 · 4 comments · May be fixed by #200
Open

Provide map interface for kv store - clojure.lang.IPersistentMap or java.util.Map ?! #109

ieugen opened this issue Apr 20, 2022 · 4 comments · May be fixed by #200
Labels
enhancement New feature or request

Comments

@ieugen
Copy link
Contributor

ieugen commented Apr 20, 2022

It would be great if we could datalevin kv store could implement IPersistentMap or java.util.Map ?!
A map interface that can be used in clojure code.

https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/IPersistentMap.java
https://docs.oracle.com/javase/8/docs/api/java/util/Map.html

@huahaiy
Copy link
Contributor

huahaiy commented Apr 20, 2022

Besides some added convenience, I assume that a motivation is to expose the capability of atomically updating some key values?

@ieugen
Copy link
Contributor Author

ieugen commented Apr 21, 2022

If that can be done it would be awesome, but I will open another issue for that since IMO it's something else.

@huahaiy huahaiy added the enhancement New feature or request label Nov 28, 2022
ieugen added a commit to ieugen/datalevin that referenced this issue Apr 1, 2023
ieugen added a commit to ieugen/datalevin that referenced this issue Apr 1, 2023
* implemented AutoCloseable close
* implemented Map clear, size, containsValue, isEmpty
ieugen added a commit to ieugen/datalevin that referenced this issue Apr 1, 2023
* implemented AutoCloseable close
* implemented Map clear, size, containsValue, isEmpty
@ieugen
Copy link
Contributor Author

ieugen commented Apr 26, 2023

(note to self)
We can test the collection implementation by using guava testlib

https://github.com/google/guava/tree/master/guava-testlib
https://dzone.com/articles/test-collection

@huahaiy
Copy link
Contributor

huahaiy commented Apr 28, 2023

It might be helpful to leverage a high performance caching solution to implement this:

https://github.com/ben-manes/caffeine/wiki

ieugen added a commit to ieugen/datalevin that referenced this issue May 12, 2023
ieugen added a commit to ieugen/datalevin that referenced this issue May 12, 2023
* implemented AutoCloseable close
* implemented Map clear, size, containsValue, isEmpty
ieugen added a commit to ieugen/datalevin that referenced this issue May 13, 2023
* We need more infrastructure to test this
ieugen added a commit to ieugen/datalevin that referenced this issue Jun 16, 2023
ieugen added a commit to ieugen/datalevin that referenced this issue Jun 16, 2023
* implemented AutoCloseable close
* implemented Map clear, size, containsValue, isEmpty
ieugen added a commit to ieugen/datalevin that referenced this issue Jun 16, 2023
* We need more infrastructure to test this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants