public class SportEventCacheImpl extends Object implements SportEventCache, DataRouterListener, ExportableSdkCache
Modifier and Type | Method and Description |
---|---|
void |
addFixtureTimestamp(Urn id)
Adds fixture timestamp to cache so that the next fixture calls for the event goes through non-cached fixture provider
|
Map<String,Long> |
cacheStatus()
Returns current cache status
|
Integer |
deleteSportEventsFromCache(Date before)
Deletes the sport events from cache which are scheduled before specified date
|
List<ExportableCi> |
exportItems()
Exports current items in the cache
|
SportEventCi |
getEventCacheItem(Urn id)
Returns a
SportEventCi instance representing a cached sport event data |
List<Urn> |
getEventIds(Date date,
Locale locale)
|
List<Urn> |
getEventIds(Urn tournamentId,
Locale locale)
Returns a
List containing id's of sport events, which belong to a specific tournament |
void |
importItems(List<ExportableCi> items)
Imports provided items into the cache
|
void |
onChildSportEventFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiSportEventChildren.SapiSportEvent data,
Locale dataLocale) |
void |
onDrawFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiDrawEvent data,
Locale dataLocale,
CacheItem requester) |
void |
onDrawFixtureFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiDrawFixture data,
Locale dataLocale,
CacheItem requester) |
void |
onDrawSummaryEndpointFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiDrawSummary data,
Locale dataLocale,
CacheItem requester) |
void |
onEventBooked(Urn id)
Method that gets triggered when the associated event gets booked trough the
BookingManager |
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 dataLocale,
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 |
onSportEventFetched(Urn id,
com.sportradar.uf.sportsapi.datamodel.SapiSportEvent data,
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) |
void |
purgeCacheItem(Urn id)
Purges an item from the
SportEventCache |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onAvailableSelectionsFetched, onCalculateProbabilityFetched, onCalculateProbabilityFilterFetched, onCompetitorFetched, onPlayerFetched, onSimpleTeamFetched, onSportCategoriesFetched, onSportEventStatusFetched, onSportFetched, onSportTournamentsFetched, onTeamFetched
public SportEventCi getEventCacheItem(Urn id) throws CacheItemNotFoundException
SportEventCi
instance representing a cached sport event datagetEventCacheItem
in interface SportEventCache
id
- an Urn
specifying the id of the sport eventSportEventCi
instance representing cached sport event dataCacheItemNotFoundException
public List<Urn> getEventIds(Urn tournamentId, Locale locale) throws IllegalCacheStateException
List
containing id's of sport events, which belong to a specific tournamentgetEventIds
in interface SportEventCache
tournamentId
- an Urn
specifying the id of the tournament to which the events should relatelocale
- the locale to fetch the dataList
containing id's of sport events, which belong to the specified tournamentIllegalCacheStateException
public List<Urn> getEventIds(Date date, Locale locale) throws IllegalCacheStateException
List
containing id's of sport events, which are scheduled for a specific date - if provided;
otherwise a List
of currently live events is returnedgetEventIds
in interface SportEventCache
date
- an optional Date
for which the data is providedlocale
- the locale to fetch the dataList
of events that are happening on the specified Date
;
or a List
of currently live eventsIllegalCacheStateException
public void purgeCacheItem(Urn id)
SportEventCache
purgeCacheItem
in interface SportEventCache
id
- The Urn
specifying the event which should be purgedpublic void onSportEventFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiSportEvent data, Locale dataLocale)
onSportEventFetched
in interface DataRouterListener
public void onChildSportEventFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiSportEventChildren.SapiSportEvent data, Locale dataLocale)
onChildSportEventFetched
in interface DataRouterListener
public void onTournamentExtendedFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiTournamentExtended data, Locale dataLocale)
onTournamentExtendedFetched
in interface DataRouterListener
public void onTournamentInfoEndpointFetched(Urn requestedId, Urn tournamentId, Urn seasonId, com.sportradar.uf.sportsapi.datamodel.SapiTournamentInfoEndpoint data, Locale dataLocale, CacheItem requester)
onTournamentInfoEndpointFetched
in interface DataRouterListener
public void onStageSummaryEndpointFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiStageSummaryEndpoint data, Locale dataLocale, CacheItem requester)
onStageSummaryEndpointFetched
in interface DataRouterListener
public void onMatchSummaryEndpointFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiMatchSummaryEndpoint data, Locale dataLocale, CacheItem requester)
onMatchSummaryEndpointFetched
in interface DataRouterListener
public void onFixtureFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiFixture data, Locale dataLocale, CacheItem requester)
onFixtureFetched
in interface DataRouterListener
public void onTournamentFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiTournament data, Locale locale)
onTournamentFetched
in interface DataRouterListener
public void onMatchTimelineFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiMatchTimelineEndpoint data, Locale dataLocale, CacheItem requester)
onMatchTimelineFetched
in interface DataRouterListener
public void onLotteryFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiLottery data, Locale dataLocale, CacheItem requester)
onLotteryFetched
in interface DataRouterListener
public void onDrawFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiDrawEvent data, Locale dataLocale, CacheItem requester)
onDrawFetched
in interface DataRouterListener
public void onDrawFixtureFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiDrawFixture data, Locale dataLocale, CacheItem requester)
onDrawFixtureFetched
in interface DataRouterListener
public void onDrawSummaryEndpointFetched(Urn id, com.sportradar.uf.sportsapi.datamodel.SapiDrawSummary data, Locale dataLocale, CacheItem requester)
onDrawSummaryEndpointFetched
in interface DataRouterListener
public void onEventBooked(Urn id)
BookingManager
onEventBooked
in interface SportEventCache
id
- the Urn
of the event that was successfully bookedpublic void addFixtureTimestamp(Urn id)
addFixtureTimestamp
in interface SportEventCache
id
- the Urn
of the eventpublic Integer deleteSportEventsFromCache(Date before)
deleteSportEventsFromCache
in interface SportEventCache
before
- the scheduled Date used to delete sport events from cachepublic List<ExportableCi> exportItems()
exportItems
in interface ExportableSdkCache
ExportableCi
containing all the items currently in the cachepublic void importItems(List<ExportableCi> items)
importItems
in interface ExportableSdkCache
items
- List of ExportableCi
to be inserted into the cachepublic Map<String,Long> cacheStatus()
cacheStatus
in interface ExportableSdkCache
Copyright © 2016–2025. All rights reserved.