Package ucar.nc2.util.cache
Class FileCacheGuava
- java.lang.Object
-
- ucar.nc2.util.cache.FileCacheGuava
-
- All Implemented Interfaces:
FileCacheIF
public class FileCacheGuava extends Object implements FileCacheIF
Memory cache using guava cache- Since:
- 11/12/2014
-
-
Constructor Summary
Constructors Constructor Description FileCacheGuava(String name, int maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileCacheableacquire(FileFactory factory, Object hashKey, DatasetUrl durl, int buffer_size, CancelTask cancelTask, Object spiObject)FileCacheableacquire(FileFactory factory, DatasetUrl durl)voidclearCache(boolean force)voiddisable()voideject(Object hashKey)voidenable()booleanrelease(FileCacheable ncfile)voidresetTracking()List<String>showCache()voidshowCache(Formatter f)voidshowStats(Formatter f)voidshowTracking(Formatter format)
-
-
-
Constructor Detail
-
FileCacheGuava
public FileCacheGuava(String name, int maxSize)
-
-
Method Detail
-
enable
public void enable()
- Specified by:
enablein interfaceFileCacheIF
-
disable
public void disable()
- Specified by:
disablein interfaceFileCacheIF
-
acquire
public FileCacheable acquire(FileFactory factory, DatasetUrl durl)
- Specified by:
acquirein interfaceFileCacheIF
-
acquire
public FileCacheable acquire(FileFactory factory, Object hashKey, DatasetUrl durl, int buffer_size, CancelTask cancelTask, Object spiObject)
- Specified by:
acquirein interfaceFileCacheIF
-
release
public boolean release(FileCacheable ncfile)
- Specified by:
releasein interfaceFileCacheIF
-
eject
public void eject(Object hashKey)
- Specified by:
ejectin interfaceFileCacheIF
-
clearCache
public void clearCache(boolean force)
- Specified by:
clearCachein interfaceFileCacheIF
-
resetTracking
public void resetTracking()
- Specified by:
resetTrackingin interfaceFileCacheIF
-
showTracking
public void showTracking(Formatter format)
- Specified by:
showTrackingin interfaceFileCacheIF
-
showCache
public void showCache(Formatter f)
- Specified by:
showCachein interfaceFileCacheIF
-
showStats
public void showStats(Formatter f)
- Specified by:
showStatsin interfaceFileCacheIF
-
showCache
public List<String> showCache()
- Specified by:
showCachein interfaceFileCacheIF
-
-