catalog: wire planNames hint through CatalogCache to catalog plugin API - #2259
Open
jutur wants to merge 2 commits into
Open
catalog: wire planNames hint through CatalogCache to catalog plugin API#2259jutur wants to merge 2 commits into
jutur wants to merge 2 commits into
Conversation
Adds a getCatalog overload on CatalogCache that accepts a Set<String> planNames and threads it through to the catalog plugin via the new CatalogPluginApi.getVersionedPluginCatalog(planNames, properties, context) overload introduced in killbill-plugin-api. Plugins managing large catalogs can now return a shallow catalog containing only the requested plans when Kill Bill passes a non-empty plan set, reducing serialization overhead. The default implementation on CatalogPluginApi falls back to the full-catalog method, so existing plugins remain unaffected. DefaultCatalogCache.getCatalog(planNames) delegates to the existing getCatalog() for all non-plugin paths (file-based, cached tenant catalog) since the optimization only applies to plugin-supplied catalogs. Depends on killbill-plugin-api#<PR> which adds the planNames overload to CatalogPluginApi. Fixes killbill#2258
Verify that the new getCatalog(planNames,...) overload correctly passes the plan-name hint to CatalogPluginApi.getVersionedPluginCatalog(planNames,...), and that an empty planNames set also reaches the 3-arg plugin overload. Remove unused Collectors import introduced during refactoring.
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.
Adds a getCatalog overload on CatalogCache that accepts a Set planNames and threads it through to the catalog plugin via the new CatalogPluginApi.getVersionedPluginCatalog(planNames, properties, context) overload introduced in killbill-plugin-api.
Plugins managing large catalogs can now return a shallow catalog containing only the requested plans when Kill Bill passes a non-empty plan set, reducing serialization overhead. The default implementation on CatalogPluginApi falls back to the full-catalog method, so existing plugins remain unaffected.
DefaultCatalogCache.getCatalog(planNames) delegates to the existing getCatalog() for all non-plugin paths (file-based, cached tenant catalog) since the optimization only applies to plugin-supplied catalogs.
Depends on killbill-plugin-api# which adds the planNames overload to CatalogPluginApi.
Fixes #2258