public interface MarketDescriptionManager
Modifier and Type | Method and Description |
---|---|
default void |
deleteVariantMarketDescriptionFromCache(int marketId,
String variantValue)
Deletes the variant market description from cache
|
List<MarketDescription> |
getMarketDescriptions()
Returns the list of all available static 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
|
default boolean |
loadMarketDescriptions()
Loads the invariant and variant list of market descriptions from the Sports API
|
default 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.
|
default 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.
|
default 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
Only call this if name of the market is needed.
|
List<MarketDescription> getMarketDescriptions()
List<MarketDescription> getMarketDescriptions(Locale locale)
Locale
locale
- the language in which the market static descriptions should be translatedLocale
List<MarketMappingData> getMarketMapping(int marketId, Producer producer)
marketId
- the id of the market for which you need the mappingproducer
- the producer for which you need the mappingList<MarketMappingData> getMarketMapping(int marketId, Map<String,String> specifiers, Producer producer)
marketId
- the id of the market for which you need the mappingspecifiers
- the associated market specifiersproducer
- the producer for which you need the mappingdefault boolean loadMarketDescriptions()
default void deleteVariantMarketDescriptionFromCache(int marketId, String variantValue)
marketId
- the market id used to delete variant market description from the cachevariantValue
- the variant value used to delete variant market description from the cachedefault long parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets)
markets
- the list of markets to be checked and fetcheddefault long parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets, boolean onlyVariantMarkets)
markets
- the list of markets to be checked and fetchedonlyVariantMarkets
- prefetch only variant markets or all markets in the list (default: true)default long parallelPrefetchVariantMarketDescriptions(List<? extends Market> markets, boolean onlyVariantMarkets, int threadPoolSize)
markets
- 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–2023. All rights reserved.