Class StockDataCache
- java.lang.Object
-
- de.bausdorf.simracing.irdataapi.tools.StockDataCache
-
@Component public class StockDataCache extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringCAR_ASSETS_JSONstatic StringCAR_CLASSES_JSONstatic StringCARS_JSONstatic StringDIVISIONS_JSONstatic StringLICENSE_GROUPS_JSONstatic StringTRACK_ASSETS_JSONstatic StringTRACKS_JSON
-
Constructor Summary
Constructors Constructor Description StockDataCache(@NonNull String cacheDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancacheExists()LongcacheLastModified()voidfetchFromCache()voidfetchFromService(IrDataClient dataClient)booleanisInitialized()
-
-
-
Field Detail
-
TRACKS_JSON
public static final String TRACKS_JSON
- See Also:
- Constant Field Values
-
TRACK_ASSETS_JSON
public static final String TRACK_ASSETS_JSON
- See Also:
- Constant Field Values
-
CARS_JSON
public static final String CARS_JSON
- See Also:
- Constant Field Values
-
CAR_CLASSES_JSON
public static final String CAR_CLASSES_JSON
- See Also:
- Constant Field Values
-
CAR_ASSETS_JSON
public static final String CAR_ASSETS_JSON
- See Also:
- Constant Field Values
-
DIVISIONS_JSON
public static final String DIVISIONS_JSON
- See Also:
- Constant Field Values
-
LICENSE_GROUPS_JSON
public static final String LICENSE_GROUPS_JSON
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StockDataCache
public StockDataCache(@NonNull @NonNull String cacheDir)
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
-
cacheExists
public boolean cacheExists()
-
cacheLastModified
public Long cacheLastModified()
-
fetchFromService
public void fetchFromService(IrDataClient dataClient)
-
fetchFromCache
public void fetchFromCache() throws IOException- Throws:
IOException
-
-