Package com.floragunn.codova.config.net
Class CacheConfig
java.lang.Object
com.floragunn.codova.config.net.CacheConfig
- All Implemented Interfaces:
Document<CacheConfig>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCacheConfig(boolean enabled, Duration expireAfterWrite, Duration expireAfterAccess, Integer maxSize) CacheConfig(DocNode config, Parser.Context context, Optional<CacheConfig> defaultValue) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.floragunn.codova.documents.Document
meta, toBytes, toDeepBasicObject, toDocNode, toJsonString, toPrettyJsonString, toSmile, toString, toYamlString
-
Field Details
-
OFF
-
DEFAULT
-
-
Constructor Details
-
CacheConfig
-
CacheConfig
public CacheConfig(DocNode config, Parser.Context context, Optional<CacheConfig> defaultValue) throws ConfigValidationException - Throws:
ConfigValidationException
-
-
Method Details
-
toBasicObject
- Specified by:
toBasicObjectin interfaceDocument<CacheConfig>
-
build
public <K,V> com.google.common.cache.Cache<K,V> build() -
buildWithStats
public <K,V> com.google.common.cache.Cache<K,V> buildWithStats() -
toString
-
getExpireAfterWrite
-
getExpireAfterAccess
-
getMaxSize
-
isEnabled
public boolean isEnabled()
-