Package org.apache.druid.common.config
Class JacksonConfigManager
java.lang.Object
org.apache.druid.common.config.JacksonConfigManager
-
Constructor Summary
ConstructorsConstructorDescriptionJacksonConfigManager(ConfigManager configManager, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, AuditManager auditManager) -
Method Summary
Modifier and TypeMethodDescription<T> TconvertByteToConfig(byte[] configInByte, Class<? extends T> clazz, T defaultVal) Set the config and add audit entrySet the config and add audit entry<T> AtomicReference<T><T> AtomicReference<T><T> AtomicReference<T>
-
Constructor Details
-
JacksonConfigManager
@Inject public JacksonConfigManager(ConfigManager configManager, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, AuditManager auditManager)
-
-
Method Details
-
watch
-
watch
-
watch
public <T> AtomicReference<T> watch(String key, com.fasterxml.jackson.core.type.TypeReference<T> clazz, T defaultVal) -
convertByteToConfig
-
set
Set the config and add audit entry- Parameters:
key- of the config to setval- new config value to insertauditInfo- metadata regarding the change to config, for audit purposes
-
set
public <T> ConfigManager.SetResult set(String key, @Nullable byte[] oldValue, T newValue, AuditInfo auditInfo) Set the config and add audit entry- Parameters:
key- of the config to setoldValue- old config value. If not null, then the update will only succeed if the insert happens when current database entry is the same as this value. Note that the current database entry (in array of bytes) have to be exactly the same as the array of bytes of this value for update to succeed. If null, then the insert will not consider the current database entry. Note that this field intentionally uses byte array to be resilient across serde of existing data retrieved from the database (instead of Java object which may have additional fields added as a result of serde)newValue- new config value to insertauditInfo- metadata regarding the change to config, for audit purposes
-