Package org.infinispan.globalstate
Interface LocalConfigurationStorage
-
public interface LocalConfigurationStorageTheLocalConfigurationStorageis responsible for applying on each node the configuration changes initiated through theGlobalConfigurationManagerand persist them unless they areCacheContainerAdmin.AdminFlag.VOLATILE.- Since:
- 9.2
- Author:
- Tristan Tarrant
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description CompletionStage<Void>createCache(String name, String template, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)Creates the cache using the supplied template, configuration and flags.CompletionStage<Void>createTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)Creates the template using the supplied configuration and flags.voidinitialize(EmbeddedCacheManager embeddedCacheManager, org.infinispan.configuration.ConfigurationManager configurationManager, org.infinispan.util.concurrent.BlockingManager blockingManager)Initialization entry point for theLocalConfigurationStoragedefault Map<String,Configuration>loadAll()Deprecated.since 12.0, useloadAllCaches()insteadMap<String,Configuration>loadAllCaches()Loads all persisted cache configurationsMap<String,Configuration>loadAllTemplates()Loads all persisted templatesCompletionStage<Void>removeCache(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)Removes the specified cache.CompletionStage<Void>removeTemplate(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)Removes the specified template.CompletionStage<Void>updateConfiguration(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)Updates an existing configuration.CompletionStage<Void>validateConfigurationUpdate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)Validates an update to an existing configuration.voidvalidateFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)Checks whether thisLocalConfigurationStoragesupports the supplied flags.
-
-
-
Method Detail
-
initialize
void initialize(EmbeddedCacheManager embeddedCacheManager, org.infinispan.configuration.ConfigurationManager configurationManager, org.infinispan.util.concurrent.BlockingManager blockingManager)
Initialization entry point for theLocalConfigurationStorage- Parameters:
embeddedCacheManager-configurationManager-blockingManager- handler to use when a blocking operation is required
-
validateFlags
void validateFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)
Checks whether thisLocalConfigurationStoragesupports the supplied flags. ACacheConfigurationExceptionwill be thrown in case this cannot be done.
-
createCache
CompletionStage<Void> createCache(String name, String template, Configuration configuration, EnumSet<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, theLocalConfigurationStorageshould 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- theConfigurationto useflags- the desiredCacheContainerAdmin.AdminFlags
-
createTemplate
CompletionStage<Void> createTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Creates the template using the supplied configuration and flags.- Parameters:
name- the name of the template to createconfiguration- theConfigurationto useflags- the desiredCacheContainerAdmin.AdminFlags
-
updateConfiguration
CompletionStage<Void> updateConfiguration(String name, Configuration configuration, EnumSet<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.AdminFlags
-
validateConfigurationUpdate
CompletionStage<Void> validateConfigurationUpdate(String name, Configuration configuration, EnumSet<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.AdminFlags
-
removeCache
CompletionStage<Void> removeCache(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Removes the specified cache.- Parameters:
name- the name of the cache to removeflags- the desiredCacheContainerAdmin.AdminFlags
-
removeTemplate
CompletionStage<Void> removeTemplate(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Removes the specified template.- Parameters:
name- the name of the template to removeflags- the desiredCacheContainerAdmin.AdminFlags
-
loadAll
@Deprecated default Map<String,Configuration> loadAll()
Deprecated.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
-
-