Class CachedSetting<T>
java.lang.Object
io.datarouter.util.cached.BaseCached<T>
io.datarouter.util.cached.Cached<T>
io.datarouter.storage.setting.cached.CachedSetting<T>
- Direct Known Subclasses:
BooleanCachedSetting,CommaSeparatedStringCachedSetting,DoubleCachedSetting,DurationCachedSetting,IntegerCachedSetting,LongCachedSetting,StringCachedSetting
public abstract class CachedSetting<T>
extends io.datarouter.util.cached.Cached<T>
implements Setting<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DefaultSettingValue<T>protected final SettingFinderprotected booleanprotected booleanprotected final StringFields inherited from class io.datarouter.util.cached.Cached
cacheForMsFields inherited from class io.datarouter.util.cached.BaseCached
cachedAtMs, value -
Constructor Summary
ConstructorsConstructorDescriptionCachedSetting(SettingFinder finder, String name, DefaultSettingValue<T> defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleangetName()protected Treload()setEnvironmentCategoryNameDefault(Supplier<DatarouterEnvironmentType> environmentType, String environmentCategoryName, T value) setEnvironmentNameDefault(Supplier<DatarouterEnvironmentType> environmentType, String environmentName, T value) setEnvironmentTypeDefault(Supplier<DatarouterEnvironmentType> environmentType, T value) setEnvironmentTypesDefault(Collection<Supplier<DatarouterEnvironmentType>> environmentTypes, T value) setGlobalDefault(T value) setServerNameDefault(Supplier<DatarouterEnvironmentType> environmentType, String serverName, T value) setServerTypeDefault(Supplier<DatarouterEnvironmentType> environmentType, ServerType serverType, T value) setServiceNameDefault(Supplier<DatarouterEnvironmentType> environmentType, String serviceName, T value) setTagDefault(Supplier<DatarouterSettingTag> tagTypeSupplier, Supplier<T> value) toString()toStringValue(T value) voidMethods inherited from class io.datarouter.util.cached.Cached
expire, isExpiredMethods inherited from class io.datarouter.util.cached.BaseCached
get, updateIfExpiredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.datarouter.storage.setting.Setting
get, isValid, parseStringValue
-
Field Details
-
finder
-
name
-
defaultSettingValue
-
hasCustomValues
protected boolean hasCustomValues -
hasRedundantCustomValues
protected boolean hasRedundantCustomValues
-
-
Constructor Details
-
CachedSetting
-
-
Method Details
-
toString
-
reload
- Specified by:
reloadin classio.datarouter.util.cached.BaseCached<T>
-
getMostSpecificDatabeanValue
-
validateAllCustomValuesCanBeParsed
public void validateAllCustomValuesCanBeParsed() -
getName
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceSetting<T>
-
toStringValue
-
toStringValue
-
toStringDefaultValue
-
getHasCustomValue
public boolean getHasCustomValue()- Specified by:
getHasCustomValuein interfaceSetting<T>
-
getHasRedundantCustomValue
public boolean getHasRedundantCustomValue()- Specified by:
getHasRedundantCustomValuein interfaceSetting<T>
-
setGlobalDefault
-
setEnvironmentTypeDefault
public CachedSetting<T> setEnvironmentTypeDefault(Supplier<DatarouterEnvironmentType> environmentType, T value) -
setEnvironmentTypesDefault
public CachedSetting<T> setEnvironmentTypesDefault(Collection<Supplier<DatarouterEnvironmentType>> environmentTypes, T value) -
setEnvironmentNameDefault
public CachedSetting<T> setEnvironmentNameDefault(Supplier<DatarouterEnvironmentType> environmentType, String environmentName, T value) -
setEnvironmentCategoryNameDefault
public CachedSetting<T> setEnvironmentCategoryNameDefault(Supplier<DatarouterEnvironmentType> environmentType, String environmentCategoryName, T value) -
setServerTypeDefault
public CachedSetting<T> setServerTypeDefault(Supplier<DatarouterEnvironmentType> environmentType, ServerType serverType, T value) -
setServerNameDefault
public CachedSetting<T> setServerNameDefault(Supplier<DatarouterEnvironmentType> environmentType, String serverName, T value) -
setServiceNameDefault
public CachedSetting<T> setServiceNameDefault(Supplier<DatarouterEnvironmentType> environmentType, String serviceName, T value) -
setTagDefault
public CachedSetting<T> setTagDefault(Supplier<DatarouterSettingTag> tagTypeSupplier, Supplier<T> value) -
getDefaultSettingValue
-
getDefaultSettingValueWinner
-