Package org.openstreetmap.josm.io
Class OsmApi.CapabilitiesCache
- java.lang.Object
-
- org.openstreetmap.josm.io.CacheCustomContent<OsmTransferException>
-
- org.openstreetmap.josm.io.OsmApi.CapabilitiesCache
-
- Enclosing class:
- OsmApi
private class OsmApi.CapabilitiesCache extends CacheCustomContent<OsmTransferException>
-
-
Field Summary
Fields Modifier and Type Field Description private static String
CAPABILITIES
private boolean
fastFail
private ProgressMonitor
monitor
-
Fields inherited from class org.openstreetmap.josm.io.CacheCustomContent
INTERVAL_ALWAYS, INTERVAL_DAILY, INTERVAL_HOURLY, INTERVAL_MONTHLY, INTERVAL_NEVER, INTERVAL_WEEKLY
-
-
Constructor Summary
Constructors Constructor Description CapabilitiesCache(ProgressMonitor monitor, boolean fastFail)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isOffline()
Checks underlying resource is not accessed in offline mode.protected byte[]
updateData()
This function will be executed when an update is required.-
Methods inherited from class org.openstreetmap.josm.io.CacheCustomContent
flushData, getData, getDataString, isCacheValid, updateForceString, updateIfRequired, updateIfRequiredString
-
-
-
-
Field Detail
-
CAPABILITIES
private static final String CAPABILITIES
- See Also:
- Constant Field Values
-
monitor
private final ProgressMonitor monitor
-
fastFail
private final boolean fastFail
-
-
Constructor Detail
-
CapabilitiesCache
CapabilitiesCache(ProgressMonitor monitor, boolean fastFail)
-
-
Method Detail
-
isOffline
protected boolean isOffline()
Description copied from class:CacheCustomContent
Checks underlying resource is not accessed in offline mode.- Specified by:
isOffline
in classCacheCustomContent<OsmTransferException>
- Returns:
- whether resource is accessed in offline mode
-
updateData
protected byte[] updateData() throws OsmTransferException
Description copied from class:CacheCustomContent
This function will be executed when an update is required. It has to be implemented by the inheriting class and should use a worker if it has a long wall time as the function is executed in the current thread.- Specified by:
updateData
in classCacheCustomContent<OsmTransferException>
- Returns:
- the data to cache
- Throws:
OsmTransferException
-
-