Class NamedValueCacheImpl
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.caching.impl.NamedValueCacheImpl
- All Implemented Interfaces:
NamedValueCache
The default implementation of the
NamedValueCache used to cache NamedValue objects-
Constructor Summary
ConstructorsConstructorDescriptionNamedValueCacheImpl(DataProvider dataProvider, SdkTaskScheduler scheduler) Initializes a new instance ofNamedValueCacheImpl -
Method Summary
Modifier and TypeMethodDescriptiongetNamedValue(int id) Gets theNamedValuespecified by the providedidbooleanisValueDefined(int id) Determines if the specifiedidexists in the current cache instance
-
Constructor Details
-
NamedValueCacheImpl
Initializes a new instance ofNamedValueCacheImpl- Parameters:
dataProvider- - theDataProviderwhich is used to retrieveNamedValuescheduler- - theSdkTaskSchedulerused to perform repeating cache tasks
-
-
Method Details
-
getNamedValue
Gets theNamedValuespecified by the providedid- Specified by:
getNamedValuein interfaceNamedValueCache- Parameters:
id- - theidof theNamedValueto retrieve.- Returns:
- - the
NamedValuespecified by the providedid
-
isValueDefined
public boolean isValueDefined(int id) Determines if the specifiedidexists in the current cache instance- Specified by:
isValueDefinedin interfaceNamedValueCache- Parameters:
id- - theidthat should be checked- Returns:
trueif the value is defined; otherwisefalse
-