public class MarketManagerImpl extends Object implements MarketDescriptionManager
| Constructor and Description | 
|---|
| MarketManagerImpl(SdkInternalConfiguration config,
                 MarketDescriptionProvider marketDescriptionProvider,
                 InvariantMarketDescriptionCache invariantMarketDescriptionCache,
                 VariantDescriptionCache variantMarketDescriptionListCache,
                 MarketDescriptionCache variantMarketDescriptionCache) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | deleteVariantMarketDescriptionFromCache(int marketId,
                                       String variantValue)Deletes the variant market description from cache | 
| List<MarketDescription> | getMarketDescriptions()Get the list of all available market descriptions. | 
| List<MarketDescription> | getMarketDescriptions(Locale locale)Returns the list of all available static market descriptions in the provided  Locale | 
| List<MarketMappingData> | getMarketMapping(int marketId,
                Map<String,String> specifiers,
                Producer producer)Returns a list of available market mappings(including possible variant mappings) for the
 provided marketId/producer combination | 
| List<MarketMappingData> | getMarketMapping(int marketId,
                Producer producer)Returns a list of available mappings for the provided marketId/producer combination | 
| boolean | loadMarketDescriptions()Loads the invariant and variant list of market descriptions from the Sports API | 
| long | parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets)Prefetch variant market descriptions in parallel
 Useful when list of markets on feed message contains many variant markets which calls single variant market description api endpoint
 Only call this if name of the market is needed. | 
| long | parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets,
                                         boolean onlyVariantMarkets)Prefetch variant market descriptions in parallel
 Useful when list of markets on feed message contains many variant markets which calls single variant market description api endpoint
 Only call this if name of the market is needed. | 
| long | parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets,
                                         boolean onlyVariantMarkets,
                                         int threadPoolSize)Prefetch variant market descriptions in parallel
 Useful when list of markets on feed message contains many variant markets which calls single variant market description api endpoint | 
@Inject public MarketManagerImpl(SdkInternalConfiguration config, MarketDescriptionProvider marketDescriptionProvider, InvariantMarketDescriptionCache invariantMarketDescriptionCache, VariantDescriptionCache variantMarketDescriptionListCache, MarketDescriptionCache variantMarketDescriptionCache)
public List<MarketDescription> getMarketDescriptions()
getMarketDescriptions in interface MarketDescriptionManagerpublic List<MarketDescription> getMarketDescriptions(Locale locale)
MarketDescriptionManagerLocalegetMarketDescriptions in interface MarketDescriptionManagerlocale - the language in which the market static descriptions should be translatedLocalepublic List<MarketMappingData> getMarketMapping(int marketId, Producer producer)
MarketDescriptionManagergetMarketMapping in interface MarketDescriptionManagermarketId - the id of the market for which you need the mappingproducer - the producer for which you need the mappingpublic List<MarketMappingData> getMarketMapping(int marketId, Map<String,String> specifiers, Producer producer)
MarketDescriptionManagergetMarketMapping in interface MarketDescriptionManagermarketId - the id of the market for which you need the mappingspecifiers - the associated market specifiersproducer - the producer for which you need the mappingpublic boolean loadMarketDescriptions()
loadMarketDescriptions in interface MarketDescriptionManagerpublic void deleteVariantMarketDescriptionFromCache(int marketId,
                                                    String variantValue)
deleteVariantMarketDescriptionFromCache in interface MarketDescriptionManagermarketId - the market id used to delete variant market description from the cachevariantValue - the variant value used to delete variant market description from the cachepublic long parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets)
MarketDescriptionManagerparallelPrefetchVariantMarketDescriptions in interface MarketDescriptionManagermarkets - the list of markets to be checked and fetchedpublic long parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets, boolean onlyVariantMarkets)
MarketDescriptionManagerparallelPrefetchVariantMarketDescriptions in interface MarketDescriptionManagermarkets - the list of markets to be checked and fetchedonlyVariantMarkets - prefetch only variant markets or all markets in the list (default: true)public long parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets, boolean onlyVariantMarkets, int threadPoolSize)
parallelPrefetchVariantMarketDescriptions in interface MarketDescriptionManagermarkets - the list of markets to be checked and fetchedonlyVariantMarkets - prefetch only variant markets or all markets in the list (default: true)threadPoolSize - the size of the fixed thread pool (default: 100)Copyright © 2016–2025. All rights reserved.