Package org.infinispan.globalstate.impl
Class OverlayLocalConfigurationStorage
java.lang.Object
org.infinispan.globalstate.impl.VolatileLocalConfigurationStorage
org.infinispan.globalstate.impl.OverlayLocalConfigurationStorage
- All Implemented Interfaces:
LocalConfigurationStorage
An implementation of
LocalConfigurationStorage which stores non-CacheContainerAdmin.AdminFlag.VOLATILE
This component persists cache configurations to the GlobalStateConfiguration.persistentLocation() in a
caches.xmlfile which is read on startup.
- Since:
- 9.2
- Author:
- Tristan Tarrant
-
Field Summary
Fields inherited from class org.infinispan.globalstate.impl.VolatileLocalConfigurationStorage
blockingManager, cacheManager, configurationManager, parserRegistry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCache(String name, String template, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Creates the cache using the supplied template, configuration and flags.createTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Creates the template using the supplied configuration and flags.Loads all persisted cache configurationsLoads all persisted templatesremoveCache(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags) Removes the specified cache.removeTemplate(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags) Removes the specified template.updateConfiguration(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Updates an existing configuration.voidChecks whether thisLocalConfigurationStoragesupports the supplied flags.Methods inherited from class org.infinispan.globalstate.impl.VolatileLocalConfigurationStorage
initialize, removeCacheSync, removeTemplateSync, validateConfigurationUpdateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.globalstate.LocalConfigurationStorage
loadAll
-
Constructor Details
-
OverlayLocalConfigurationStorage
public OverlayLocalConfigurationStorage()
-
-
Method Details
-
validateFlags
Description copied from interface:LocalConfigurationStorageChecks whether thisLocalConfigurationStoragesupports the supplied flags. ACacheConfigurationExceptionwill be thrown in case this cannot be done.- Specified by:
validateFlagsin interfaceLocalConfigurationStorage- Overrides:
validateFlagsin classVolatileLocalConfigurationStorage
-
createTemplate
public CompletionStage<Void> createTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Description copied from interface:LocalConfigurationStorageCreates the template using the supplied configuration and flags.- Specified by:
createTemplatein interfaceLocalConfigurationStorage- Overrides:
createTemplatein classVolatileLocalConfigurationStorage- Parameters:
name- the name of the template to createconfiguration- theConfigurationto useflags- the desiredCacheContainerAdmin.AdminFlags
-
removeTemplate
public CompletionStage<Void> removeTemplate(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags) Description copied from interface:LocalConfigurationStorageRemoves the specified template.- Specified by:
removeTemplatein interfaceLocalConfigurationStorage- Overrides:
removeTemplatein classVolatileLocalConfigurationStorage- Parameters:
name- the name of the template to removeflags- the desiredCacheContainerAdmin.AdminFlags
-
createCache
public CompletionStage<Void> createCache(String name, String template, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Description copied from interface:LocalConfigurationStorageCreates 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.- Specified by:
createCachein interfaceLocalConfigurationStorage- Overrides:
createCachein classVolatileLocalConfigurationStorage- 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
-
updateConfiguration
public CompletionStage<Void> updateConfiguration(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Description copied from interface:LocalConfigurationStorageUpdates an existing configuration. Only the attributes that are mutable and that have been modified in the supplied configuration will be applied.- Specified by:
updateConfigurationin interfaceLocalConfigurationStorage- Overrides:
updateConfigurationin classVolatileLocalConfigurationStorage- Parameters:
name- the name of the configuration (cache/template)configuration- the configuration changes to applyflags- the desiredCacheContainerAdmin.AdminFlags
-
removeCache
Description copied from interface:LocalConfigurationStorageRemoves the specified cache.- Specified by:
removeCachein interfaceLocalConfigurationStorage- Overrides:
removeCachein classVolatileLocalConfigurationStorage- Parameters:
name- the name of the cache to removeflags- the desiredCacheContainerAdmin.AdminFlags
-
loadAllCaches
Description copied from interface:LocalConfigurationStorageLoads all persisted cache configurations- Specified by:
loadAllCachesin interfaceLocalConfigurationStorage- Overrides:
loadAllCachesin classVolatileLocalConfigurationStorage
-
loadAllTemplates
Description copied from interface:LocalConfigurationStorageLoads all persisted templates- Specified by:
loadAllTemplatesin interfaceLocalConfigurationStorage- Overrides:
loadAllTemplatesin classVolatileLocalConfigurationStorage
-