Class CachedConfigValue<T>
- java.lang.Object
-
- cc.carm.lib.configuration.core.value.ValueManifest<T>
-
- cc.carm.lib.configuration.core.value.ConfigValue<T>
-
- cc.carm.lib.configuration.core.value.impl.CachedConfigValue<T>
-
- Direct Known Subclasses:
ConfiguredList
,ConfiguredSection
,ConfiguredValue
,ConfigValueMap
public abstract class CachedConfigValue<T> extends ConfigValue<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected T
cachedValue
protected long
parsedTime
-
Fields inherited from class cc.carm.lib.configuration.core.value.ValueManifest
configPath, defaultValue, headerComments, inlineComment, provider
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CachedConfigValue(@NotNull ValueManifest<T> manifest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected T
getCachedOrDefault()
protected T
getCachedOrDefault(T emptyValue)
T
getCachedValue()
protected T
getDefaultFirst(T value)
boolean
isExpired()
protected T
updateCache(T value)
-
Methods inherited from class cc.carm.lib.configuration.core.value.ConfigValue
builder, get, getNotNull, getOptional, getOrDefault, initialize, isDefault, set, setDefault, setDefault
-
Methods inherited from class cc.carm.lib.configuration.core.value.ValueManifest
getConfigPath, getConfiguration, getDefaultValue, getHeaderComments, getInlineComment, getProvider, getValue, initialize, of, of, setDefaultValue, setValue
-
-
-
-
Field Detail
-
cachedValue
@Nullable protected T cachedValue
-
parsedTime
protected long parsedTime
-
-
Constructor Detail
-
CachedConfigValue
protected CachedConfigValue(@NotNull @NotNull ValueManifest<T> manifest)
-
-