Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

FEAT: Automatic deduction of Converter class #111

Open
karczex opened this issue Jan 22, 2021 · 0 comments
Open

FEAT: Automatic deduction of Converter class #111

karczex opened this issue Jan 22, 2021 · 0 comments
Milestone

Comments

@karczex
Copy link

karczex commented Jan 22, 2021

FEAT: Automatic deduction of Converter class

Rationale

For specialization of DatabaseClass<K, V>, with types, which Converter is implemented as part of library, the Converter should be automatically deduced inside Builder class. Such feature will simplify construction of Database for types, which implements interfaces supported by pmemkv-java.

Currently only ByteBufferConverter is implemented, however, as more converters will be part of library, this feature will be more useful

API Changes

Invocation of setKeyConverter() ans setValueConverter() would be not needed, yet possible if user want to provide own implementation.

Database<ByteBuffer, ByteBuffer> db = new Database.Builder<ByteBuffer, ByteBuffer>(ENGINE)
				.setSize(1073741824)
				.setPath("/dev/shm")
				.build();
@karczex karczex added this to the 2.0 milestone Jan 25, 2021
@igchor igchor modified the milestones: 2.0, 1.1 Jan 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants