K
- The key type of the cacheV
- the value type to be stored on the cacheCachedRemoteScopInstallation
, RemoteDomainProvider
, RemotePDPProvider
public class SerializableCache<K,V>
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String |
cacheFileName |
|
protected java.util.Map<K,V> |
serializedCache |
Constructor | Description |
---|---|
SerializableCache(java.lang.String cacheFileName) |
set cacheFileName to null to disable caching
|
Modifier and Type | Method | 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() |
|
java.util.Map<K,V> |
reloadFromFile() |
public SerializableCache(java.lang.String cacheFileName)
cacheFileName
- public boolean isCacheEnabled()
public void cache(K name, V data)
name
- data
- public void disableCache()
public void enableCache()
public void flushCache()