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 FileCacheable
acquire(FileFactory factory, Object hashKey, DatasetUrl durl, int buffer_size, CancelTask cancelTask, Object spiObject)
FileCacheable
acquire(FileFactory factory, DatasetUrl durl)
void
clearCache(boolean force)
void
disable()
void
eject(Object hashKey)
void
enable()
boolean
release(FileCacheable ncfile)
void
resetTracking()
List<String>
showCache()
void
showCache(Formatter f)
void
showStats(Formatter f)
void
showTracking(Formatter format)
-
-
-
Constructor Detail
-
FileCacheGuava
public FileCacheGuava(String name, int maxSize)
-
-
Method Detail
-
enable
public void enable()
- Specified by:
enable
in interfaceFileCacheIF
-
disable
public void disable()
- Specified by:
disable
in interfaceFileCacheIF
-
acquire
public FileCacheable acquire(FileFactory factory, DatasetUrl durl)
- Specified by:
acquire
in interfaceFileCacheIF
-
acquire
public FileCacheable acquire(FileFactory factory, Object hashKey, DatasetUrl durl, int buffer_size, CancelTask cancelTask, Object spiObject)
- Specified by:
acquire
in interfaceFileCacheIF
-
release
public boolean release(FileCacheable ncfile)
- Specified by:
release
in interfaceFileCacheIF
-
eject
public void eject(Object hashKey)
- Specified by:
eject
in interfaceFileCacheIF
-
clearCache
public void clearCache(boolean force)
- Specified by:
clearCache
in interfaceFileCacheIF
-
resetTracking
public void resetTracking()
- Specified by:
resetTracking
in interfaceFileCacheIF
-
showTracking
public void showTracking(Formatter format)
- Specified by:
showTracking
in interfaceFileCacheIF
-
showCache
public void showCache(Formatter f)
- Specified by:
showCache
in interfaceFileCacheIF
-
showStats
public void showStats(Formatter f)
- Specified by:
showStats
in interfaceFileCacheIF
-
showCache
public List<String> showCache()
- Specified by:
showCache
in interfaceFileCacheIF
-
-