Class ConfigHistoryService
- java.lang.Object
-
- com.floragunn.searchguard.sgconf.history.ConfigHistoryService
-
- All Implemented Interfaces:
com.floragunn.searchguard.modules.state.ComponentStateProvider
public class ConfigHistoryService extends Object implements com.floragunn.searchguard.modules.state.ComponentStateProvider
-
-
Field Summary
Fields Modifier and Type Field Description static org.elasticsearch.common.settings.Setting<Integer>CACHE_MAX_SIZEstatic org.elasticsearch.common.settings.Setting<Integer>CACHE_TTLstatic org.elasticsearch.common.settings.Setting<String>INDEX_NAMEstatic org.elasticsearch.common.settings.Setting<Integer>MODEL_CACHE_MAX_SIZEstatic org.elasticsearch.common.settings.Setting<Integer>MODEL_CACHE_TTL
-
Constructor Summary
Constructors Constructor Description ConfigHistoryService(com.floragunn.searchguard.configuration.ConfigurationRepository configurationRepository, com.floragunn.searchguard.sgconf.StaticSgConfig staticSgConfig, com.floragunn.searchguard.support.PrivilegedConfigClient privilegedConfigClient, com.floragunn.searchguard.configuration.ProtectedConfigIndexService protectedConfigIndexService, com.floragunn.searchguard.sgconf.DynamicConfigFactory dynamicConfigFactory, org.elasticsearch.common.settings.Settings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.floragunn.searchguard.modules.state.ComponentStategetComponentState()com.floragunn.searchguard.sgconf.ConfigModelgetConfigModelForSnapshot(ConfigSnapshot configSnapshot)voidgetConfigSnapshot(ConfigVersionSet configVersionSet, Consumer<ConfigSnapshot> onResult, Consumer<Exception> onFailure)voidgetConfigSnapshots(Set<ConfigVersionSet> configVersionSets, Consumer<Map<ConfigVersionSet,ConfigSnapshot>> onResult, Consumer<Exception> onFailure)com.floragunn.searchguard.sgconf.ConfigModelgetCurrentConfigModel()ConfigSnapshotgetCurrentConfigSnapshot()ConfigSnapshotgetCurrentConfigSnapshot(com.floragunn.searchguard.sgconf.impl.CType first, com.floragunn.searchguard.sgconf.impl.CType... rest)ConfigSnapshotgetCurrentConfigSnapshot(Set<com.floragunn.searchguard.sgconf.impl.CType> configurationTypes)StringgetIndexName()com.floragunn.searchguard.sgconf.impl.SgDynamicConfiguration<?>parseConfig(org.elasticsearch.action.get.GetResponse singleGetResponse)ConfigSnapshotpeekConfigSnapshot(ConfigVersionSet configVersionSet)voidpeekConfigSnapshot(ConfigVersionSet configVersionSet, Consumer<ConfigSnapshot> onResult, Consumer<Exception> onFailure)ConfigSnapshotpeekConfigSnapshotFromCache(ConfigVersionSet configVersionSet)
-
-
-
Field Detail
-
INDEX_NAME
public static final org.elasticsearch.common.settings.Setting<String> INDEX_NAME
-
CACHE_TTL
public static final org.elasticsearch.common.settings.Setting<Integer> CACHE_TTL
-
CACHE_MAX_SIZE
public static final org.elasticsearch.common.settings.Setting<Integer> CACHE_MAX_SIZE
-
MODEL_CACHE_TTL
public static final org.elasticsearch.common.settings.Setting<Integer> MODEL_CACHE_TTL
-
MODEL_CACHE_MAX_SIZE
public static final org.elasticsearch.common.settings.Setting<Integer> MODEL_CACHE_MAX_SIZE
-
-
Constructor Detail
-
ConfigHistoryService
public ConfigHistoryService(com.floragunn.searchguard.configuration.ConfigurationRepository configurationRepository, com.floragunn.searchguard.sgconf.StaticSgConfig staticSgConfig, com.floragunn.searchguard.support.PrivilegedConfigClient privilegedConfigClient, com.floragunn.searchguard.configuration.ProtectedConfigIndexService protectedConfigIndexService, com.floragunn.searchguard.sgconf.DynamicConfigFactory dynamicConfigFactory, org.elasticsearch.common.settings.Settings settings)
-
-
Method Detail
-
getCurrentConfigSnapshot
public ConfigSnapshot getCurrentConfigSnapshot()
-
getCurrentConfigSnapshot
public ConfigSnapshot getCurrentConfigSnapshot(com.floragunn.searchguard.sgconf.impl.CType first, com.floragunn.searchguard.sgconf.impl.CType... rest)
-
getCurrentConfigSnapshot
public ConfigSnapshot getCurrentConfigSnapshot(Set<com.floragunn.searchguard.sgconf.impl.CType> configurationTypes)
-
getConfigSnapshot
public void getConfigSnapshot(ConfigVersionSet configVersionSet, Consumer<ConfigSnapshot> onResult, Consumer<Exception> onFailure)
-
getConfigSnapshots
public void getConfigSnapshots(Set<ConfigVersionSet> configVersionSets, Consumer<Map<ConfigVersionSet,ConfigSnapshot>> onResult, Consumer<Exception> onFailure)
-
getConfigModelForSnapshot
public com.floragunn.searchguard.sgconf.ConfigModel getConfigModelForSnapshot(ConfigSnapshot configSnapshot)
-
peekConfigSnapshotFromCache
public ConfigSnapshot peekConfigSnapshotFromCache(ConfigVersionSet configVersionSet)
-
peekConfigSnapshot
public ConfigSnapshot peekConfigSnapshot(ConfigVersionSet configVersionSet)
-
peekConfigSnapshot
public void peekConfigSnapshot(ConfigVersionSet configVersionSet, Consumer<ConfigSnapshot> onResult, Consumer<Exception> onFailure)
-
parseConfig
public com.floragunn.searchguard.sgconf.impl.SgDynamicConfiguration<?> parseConfig(org.elasticsearch.action.get.GetResponse singleGetResponse)
-
getIndexName
public String getIndexName()
-
getCurrentConfigModel
public com.floragunn.searchguard.sgconf.ConfigModel getCurrentConfigModel()
-
getComponentState
public com.floragunn.searchguard.modules.state.ComponentState getComponentState()
- Specified by:
getComponentStatein interfacecom.floragunn.searchguard.modules.state.ComponentStateProvider
-
-