Package org.infinispan.globalstate
Interface LocalConfigurationStorage
- All Known Implementing Classes:
ImmutableLocalConfigurationStorage
,OverlayLocalConfigurationStorage
,VolatileLocalConfigurationStorage
public interface LocalConfigurationStorage
The
LocalConfigurationStorage
is responsible for applying on each node the configuration changes initiated
through the GlobalConfigurationManager
and persist them unless they are
CacheContainerAdmin.AdminFlag.VOLATILE
.- Since:
- 9.2
- Author:
- Tristan Tarrant
-
Method Summary
Modifier and TypeMethodDescriptioncreateCache
(String name, String template, Configuration configuration, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Creates the cache using the supplied template, configuration and flags.createTemplate
(String name, Configuration configuration, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Creates the template using the supplied configuration and flags.void
initialize
(EmbeddedCacheManager embeddedCacheManager, ConfigurationManager configurationManager, BlockingManager blockingManager) Initialization entry point for theLocalConfigurationStorage
default Map
<String, Configuration> loadAll()
Deprecated, for removal: This API element is subject to removal in a future version.Loads all persisted cache configurationsLoads all persisted templatesremoveCache
(String name, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Removes the specified cache.removeTemplate
(String name, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Removes the specified template.updateConfiguration
(String name, Configuration configuration, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Updates an existing configuration.validateConfigurationUpdate
(String name, Configuration configuration, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Validates an update to an existing configuration.void
validateFlags
(EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Checks whether thisLocalConfigurationStorage
supports the supplied flags.
-
Method Details
-
initialize
void initialize(EmbeddedCacheManager embeddedCacheManager, ConfigurationManager configurationManager, BlockingManager blockingManager) Initialization entry point for theLocalConfigurationStorage
- Parameters:
embeddedCacheManager
-configurationManager
-blockingManager
- handler to use when a blocking operation is required
-
validateFlags
Checks whether thisLocalConfigurationStorage
supports the supplied flags. ACacheConfigurationException
will be thrown in case this cannot be done. -
createCache
CompletionStage<Void> createCache(String name, String template, Configuration configuration, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Creates the cache using the supplied template, configuration and flags. This method may be invoked either with or without a template. In both cases a concrete configuration will also be available. If a template name is present, theLocalConfigurationStorage
should use it, e.g. when persisting the configuration.- Parameters:
name
- the name of the cache to createtemplate
- the template that should be used to configure the cache. Can be null.configuration
- theConfiguration
to useflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
createTemplate
CompletionStage<Void> createTemplate(String name, Configuration configuration, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Creates the template using the supplied configuration and flags.- Parameters:
name
- the name of the template to createconfiguration
- theConfiguration
to useflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
updateConfiguration
CompletionStage<Void> updateConfiguration(String name, Configuration configuration, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Updates an existing configuration. Only the attributes that are mutable and that have been modified in the supplied configuration will be applied.- Parameters:
name
- the name of the configuration (cache/template)configuration
- the configuration changes to applyflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
validateConfigurationUpdate
CompletionStage<Void> validateConfigurationUpdate(String name, Configuration configuration, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Validates an update to an existing configuration.- Parameters:
name
- the name of the configuration (cache/template)configuration
- the configuration changes to applyflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
removeCache
CompletionStage<Void> removeCache(String name, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Removes the specified cache.- Parameters:
name
- the name of the cache to removeflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
removeTemplate
CompletionStage<Void> removeTemplate(String name, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags) Removes the specified template.- Parameters:
name
- the name of the template to removeflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
loadAll
Deprecated, for removal: This API element is subject to removal in a future version.since 12.0, useloadAllCaches()
insteadLoads all persisted cache configurations -
loadAllCaches
Map<String,Configuration> loadAllCaches()Loads all persisted cache configurations -
loadAllTemplates
Map<String,Configuration> loadAllTemplates()Loads all persisted templates
-
loadAllCaches()
instead