chore: make AndroidBaseClient generic for injectable configuration - #259
Closed
typotter wants to merge 10 commits into
Closed
chore: make AndroidBaseClient generic for injectable configuration#259typotter wants to merge 10 commits into
typotter wants to merge 10 commits into
Conversation
Adapt JacksonConfigurationParser and GsonConfigurationParser to the new 2-param ConfigurationParser<ConfigurationType, JSONFlagType> interface from sdk-common-jdk #243. Old methods removed: buildConfig(byte[], ...), requiresUpdatedBanditModels, applyBanditParameters. New methods: parseFlagConfig(byte[]) and buildConfig(FlagConfigResponse, snapshotId, previousConfig, banditParamsBytes). Bump dependencies to release versions (eppo-sdk-framework 0.1.0, sdk-common-jvm 4.0.0) matching core main post-#243.
Implement IConfigurationStore subscriber methods from sdk-common-jdk #248. Subscribers are notified after saveConfiguration updates the in-memory cache. Uses CopyOnWriteArrayList for thread safety. This enables BaseEppoClient.onConfigurationChange to delegate to the store (sdk-common-jdk #252) and supports setConfiguration.
Replace hand-rolled subscribe/unsubscribe with AbstractConfigurationStore from sdk-common-jdk #248. CachingConfigurationStore now implements persist() instead of saveConfiguration() — base class handles callback notification via CallbackManager.
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Picks up Heath's work from #257, adds spotless formatting fixes.
Changes
AndroidBaseClient,CachingConfigurationStore,FileBackedConfigStoreparameterized overSerializableEppoConfigurationBase
Targets
snapshot/typo/v5. Supersedes #257.Depends on sdk-common-jdk #243 (Configuration generics).
Note
This PR is based on the 3-param
ConfigurationParserdesign. Will need updating once sdk-common-jdk #243 (which redesigns to 2-param) is merged and SNAPSHOT republished.