public class SportsDataCacheImpl extends Object implements SportsDataCache, DataRouterListener, ExportableSdkCache
| Constructor and Description |
|---|
SportsDataCacheImpl(com.google.common.cache.Cache<Urn,SportCi> sportsCache,
com.google.common.cache.Cache<Urn,CategoryCi> categoriesCache,
CacheItemFactory cacheItemFactory,
DataRouterManager dataRouterManager) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Long> |
cacheStatus()
Returns current cache status
|
List<ExportableCi> |
exportItems()
Exports current items in the cache
|
CategoryCi |
getCategory(Urn categoryId,
List<Locale> locales)
Returns the associated category data
|
SportData |
getSport(Urn sportId,
List<Locale> locales)
|
List<SportData> |
getSports(List<Locale> locales)
Returns a
List sports supported by the feed. |
void |
importItems(List<ExportableCi> items)
Imports provided items into the cache
|
void |
onDrawFixtureFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiDrawFixture data,
Locale locale,
CacheItem requester) |
void |
onFixtureFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiFixture data,
Locale dataLocale,
CacheItem requester) |
void |
onLotteryFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiLottery data,
Locale locale,
CacheItem requester) |
void |
onMatchSummaryEndpointFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiMatchSummaryEndpoint data,
Locale dataLocale,
CacheItem requester) |
void |
onMatchTimelineFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiMatchTimelineEndpoint data,
Locale dataLocale,
CacheItem requester) |
void |
onSportCategoriesFetched(Urn sportId,
com.sportradar.uf.sportsapi.datamodel.SapiSportCategoriesEndpoint data,
Locale locale,
CacheItem requester) |
void |
onSportEventFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiSportEvent data,
Locale dataLocale) |
void |
onSportFetched(Urn sportId,
com.sportradar.uf.sportsapi.datamodel.SapiSport sport,
Locale dataLocale) |
void |
onStageSummaryEndpointFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiStageSummaryEndpoint data,
Locale dataLocale,
CacheItem requester) |
void |
onTournamentExtendedFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiTournamentExtended data,
Locale dataLocale) |
void |
onTournamentFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiTournament data,
Locale locale) |
void |
onTournamentInfoEndpointFetched(Urn requestedId,
Urn tournamentId,
Urn seasonId,
com.sportradar.uf.sportsapi.datamodel.SapiTournamentInfoEndpoint data,
Locale dataLocale,
CacheItem requester) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonAvailableSelectionsFetched, onCalculateProbabilityFetched, onCalculateProbabilityFilterFetched, onChildSportEventFetched, onCompetitorFetched, onDrawFetched, onDrawSummaryEndpointFetched, onPlayerFetched, onSimpleTeamFetched, onSportEventStatusFetched, onSportTournamentsFetched, onTeamFetched@Inject public SportsDataCacheImpl(com.google.common.cache.Cache<Urn,SportCi> sportsCache, com.google.common.cache.Cache<Urn,CategoryCi> categoriesCache, CacheItemFactory cacheItemFactory, DataRouterManager dataRouterManager)
public List<SportData> getSports(List<Locale> locales) throws IllegalCacheStateException
List sports supported by the feed.getSports in interface SportsDataCachelocales - a List of Locale specifying the languages in which the data is returnedList sports supported by the feedIllegalCacheStateExceptionpublic SportData getSport(Urn sportId, List<Locale> locales) throws IllegalCacheStateException, CacheItemNotFoundException
getSport in interface SportsDataCachesportId - a Urn specifying the id of the sportlocales - a List of Locale specifying the languages in which the data is returnedSportData containing information about the requested sportIllegalCacheStateExceptionCacheItemNotFoundExceptionpublic CategoryCi getCategory(Urn categoryId, List<Locale> locales) throws IllegalCacheStateException, CacheItemNotFoundException
getCategory in interface SportsDataCachecategoryId - the identifier of the categorylocales - the locales in which to provide the dataIllegalCacheStateException - if the cache load failedCacheItemNotFoundException - if the cache item could not be found - category does not exists in the cache/apipublic void onSportEventFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiSportEvent data, Locale dataLocale)
onSportEventFetched in interface DataRouterListenerpublic void onTournamentFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiTournament data, Locale locale)
onTournamentFetched in interface DataRouterListenerpublic void onTournamentExtendedFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiTournamentExtended data, Locale dataLocale)
onTournamentExtendedFetched in interface DataRouterListenerpublic void onTournamentInfoEndpointFetched(Urn requestedId, Urn tournamentId, Urn seasonId, com.sportradar.uf.sportsapi.datamodel.SapiTournamentInfoEndpoint data, Locale dataLocale, CacheItem requester)
onTournamentInfoEndpointFetched in interface DataRouterListenerpublic void onStageSummaryEndpointFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiStageSummaryEndpoint data, Locale dataLocale, CacheItem requester)
onStageSummaryEndpointFetched in interface DataRouterListenerpublic void onMatchSummaryEndpointFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiMatchSummaryEndpoint data, Locale dataLocale, CacheItem requester)
onMatchSummaryEndpointFetched in interface DataRouterListenerpublic void onFixtureFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiFixture data, Locale dataLocale, CacheItem requester)
onFixtureFetched in interface DataRouterListenerpublic void onSportFetched(Urn sportId, com.sportradar.uf.sportsapi.datamodel.SapiSport sport, Locale dataLocale)
onSportFetched in interface DataRouterListenerpublic void onMatchTimelineFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiMatchTimelineEndpoint data, Locale dataLocale, CacheItem requester)
onMatchTimelineFetched in interface DataRouterListenerpublic void onLotteryFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiLottery data, Locale locale, CacheItem requester)
onLotteryFetched in interface DataRouterListenerpublic void onDrawFixtureFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiDrawFixture data, Locale locale, CacheItem requester)
onDrawFixtureFetched in interface DataRouterListenerpublic void onSportCategoriesFetched(Urn sportId, com.sportradar.uf.sportsapi.datamodel.SapiSportCategoriesEndpoint data, Locale locale, CacheItem requester)
onSportCategoriesFetched in interface DataRouterListenerpublic List<ExportableCi> exportItems()
exportItems in interface ExportableSdkCacheExportableCi containing all the items currently in the cachepublic void importItems(List<ExportableCi> items)
importItems in interface ExportableSdkCacheitems - List of ExportableCi to be inserted into the cachepublic Map<String,Long> cacheStatus()
cacheStatus in interface ExportableSdkCacheCopyright © 2016–2025. All rights reserved.