public class DiskLocationCache extends Object implements LocationCache
LocationCache.| Constructor and Description |
|---|
DiskLocationCache() |
| Modifier and Type | Method and Description |
|---|---|
Location |
cachedLocation(Location source)
Gets the cache location of a given data source.
|
boolean |
canCache(Location source)
Gets whether the given location can be cached by this cache.
|
File |
getBaseDirectory() |
boolean |
isFileLocationCachingEnabled() |
String |
loadChecksum(Location source)
Loads the checksum value which corresponds to the cached location.
|
void |
saveChecksum(Location source,
String checksum)
Associates the given checksum value with the specified source location.
|
void |
setBaseDirectory(File baseDir) |
void |
setFileLocationCachingEnabled(boolean enabled) |
public File getBaseDirectory()
public void setBaseDirectory(File baseDir)
public boolean isFileLocationCachingEnabled()
public void setFileLocationCachingEnabled(boolean enabled)
public boolean canCache(Location source)
LocationCachecanCache in interface LocationCachepublic Location cachedLocation(Location source)
LocationCachecachedLocation in interface LocationCacheLocation where the source data is, or would be, cached.public String loadChecksum(Location source) throws IOException
LocationCacheloadChecksum in interface LocationCachesource - The source location for which the cached checksum is desired.IOException - If something goes wrong accessing the checksum.DataHandle.checksum()public void saveChecksum(Location source, String checksum) throws IOException
LocationCachesaveChecksum in interface LocationCachesource - The source location for which the checksum should be cached.checksum - The checksum value to cache.IOException - If something goes wrong caching the checksum.DataHandle.checksum()Copyright © 2015–2022 SciJava. All rights reserved.