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

KV stores must implement their own (de)serialization #353

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

wazzamatazz
Copy link
Contributor

  • IKeyValueStore read/write method signatures have changed and no longer expect to receive or return byte[] (unless explicitly requested by a caller).
  • KeyValueStore no longer (de)serializes values by default but defines new helper methods that can be used in implementations to serialize values to JSON and compress the resulting bytes and to deserialize compressed JSON bytes.
  • KeyValueStoreOptions has a new JsonOptions property for defining default JSON options to use when (de)serializing values if no options are passed to the (de)serialize helper method.
  • KeyValueStore<TOptions> now seals the overridden GetCompressionLevel() method to always use the compression level from the TOptions.
  • Microsoft FASTER, file system and SQLite stores have been updated to use new (de)serialization helper methods.

- `IKeyValueStore` read/write method signatures have changed and no longer expect to receive or return `byte[]` (unless explicitly requested by a caller).
- `KeyValueStore` no longer (de)serializes values by default but defines new helper methods that can be used in implementations to serialize values to JSON and compress the resulting bytes and to deserialize compressed JSON bytes.
- `KeyValueStoreOptions` has a new `JsonOptions` property for defining default JSON options to use when (de)serializing values if no options are passed to the (de)serialize helper method.
- `KeyValueStore<TOptions>` now seals the overridden `GetCompressionLevel()` method to always use the compression level from the `TOptions`.
- Microsoft FASTER, file system and SQLite stores have been updated to use new (de)serialization helper methods.
@wazzamatazz wazzamatazz merged commit cf63865 into develop/3.1.0 Oct 3, 2023
@wazzamatazz wazzamatazz deleted the key-value-store-refactor branch October 3, 2023 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant