Package com.configcat
Class ConfigCache
- java.lang.Object
-
- com.configcat.ConfigCache
-
public abstract class ConfigCache extends java.lang.ObjectA cache API used to make custom cache implementations forConfigCatClient.
-
-
Constructor Summary
Constructors Constructor Description ConfigCache()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract java.lang.Stringread(java.lang.String key)Child classes has to implement this method, theConfigCatClientuses it to get the actual value from the cache.protected abstract voidwrite(java.lang.String key, java.lang.String value)* Child classes has to implement this method, theConfigCatClientuses it to set the actual cached value.
-
-
-
Method Detail
-
read
protected abstract java.lang.String read(java.lang.String key) throws java.lang.ExceptionChild classes has to implement this method, theConfigCatClientuses it to get the actual value from the cache.- Parameters:
key- the key of the cache entry.- Returns:
- the cached configuration.
- Throws:
java.lang.Exception- if unable to read the cache.
-
write
protected abstract void write(java.lang.String key, java.lang.String value) throws java.lang.Exception* Child classes has to implement this method, theConfigCatClientuses it to set the actual cached value.- Parameters:
key- the key of the cache entry.value- the new value to cache.- Throws:
java.lang.Exception- if unable to save the value.
-
-