K - The key type of the cacheV - the value type to be stored on the cachepublic class SerializableCache<K,V> extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected String | cacheFileName | 
| protected Map<K,V> | serializedCache | 
| Constructor and Description | 
|---|
| SerializableCache(String cacheFileName)set cacheFileName to null to disable caching | 
| Modifier and Type | Method and Description | 
|---|---|
| void | cache(K name,
     V data)This will not cache null values. | 
| void | disableCache() | 
| void | enableCache() | 
| void | flushCache() | 
| V | get(K name) | 
| boolean | isCacheEnabled() | 
| Map<K,V> | reloadFromFile() | 
protected String cacheFileName
public SerializableCache(String cacheFileName)
cacheFileName - public boolean isCacheEnabled()
public void cache(K name, V data)
name - data - public void disableCache()
public void enableCache()
public void flushCache()
Copyright © 2000–2016 BioJava. All rights reserved.