Package org.infinispan.globalstate.impl
Class VolatileLocalConfigurationStorage
- java.lang.Object
-
- org.infinispan.globalstate.impl.VolatileLocalConfigurationStorage
-
- All Implemented Interfaces:
LocalConfigurationStorage
- Direct Known Subclasses:
OverlayLocalConfigurationStorage
public class VolatileLocalConfigurationStorage extends Object implements LocalConfigurationStorage
An implementation ofLocalConfigurationStorage
which does only supportsCacheContainerAdmin.AdminFlag.VOLATILE
operations- Since:
- 9.2
- Author:
- Tristan Tarrant
-
-
Field Summary
Fields Modifier and Type Field Description protected BlockingManager
blockingManager
protected EmbeddedCacheManager
cacheManager
protected ConfigurationManager
configurationManager
protected static org.infinispan.util.logging.Log
log
protected ParserRegistry
parserRegistry
-
Constructor Summary
Constructors Constructor Description VolatileLocalConfigurationStorage()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.globalstate.LocalConfigurationStorage
loadAll
-
-
-
-
Field Detail
-
log
protected static final org.infinispan.util.logging.Log log
-
cacheManager
protected EmbeddedCacheManager cacheManager
-
parserRegistry
protected ParserRegistry parserRegistry
-
configurationManager
protected ConfigurationManager configurationManager
-
blockingManager
protected BlockingManager blockingManager
-
-
Method Detail
-
initialize
public void initialize(EmbeddedCacheManager cacheManager, ConfigurationManager configurationManager, BlockingManager blockingManager)
Description copied from interface:LocalConfigurationStorage
Initialization entry point for theLocalConfigurationStorage
- Specified by:
initialize
in interfaceLocalConfigurationStorage
blockingManager
- handler to use when a blocking operation is required
-
validateFlags
public void validateFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)
Description copied from interface:LocalConfigurationStorage
Checks whether thisLocalConfigurationStorage
supports the supplied flags. ACacheConfigurationException
will be thrown in case this cannot be done.- Specified by:
validateFlags
in interfaceLocalConfigurationStorage
-
createTemplate
public CompletionStage<Void> createTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Description copied from interface:LocalConfigurationStorage
Creates the template using the supplied configuration and flags.- Specified by:
createTemplate
in interfaceLocalConfigurationStorage
- Parameters:
name
- the name of the template to createconfiguration
- theConfiguration
to useflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
createCache
public CompletionStage<Void> createCache(String name, String template, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Description copied from interface:LocalConfigurationStorage
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.- Specified by:
createCache
in interfaceLocalConfigurationStorage
- 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
-
validateConfigurationUpdate
public CompletionStage<Void> validateConfigurationUpdate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Description copied from interface:LocalConfigurationStorage
Validates an update to an existing configuration.- Specified by:
validateConfigurationUpdate
in interfaceLocalConfigurationStorage
- Parameters:
name
- the name of the configuration (cache/template)configuration
- the configuration changes to applyflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
updateConfiguration
public CompletionStage<Void> updateConfiguration(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Description copied from interface:LocalConfigurationStorage
Updates an existing configuration. Only the attributes that are mutable and that have been modified in the supplied configuration will be applied.- Specified by:
updateConfiguration
in interfaceLocalConfigurationStorage
- Parameters:
name
- the name of the configuration (cache/template)configuration
- the configuration changes to applyflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
removeCache
public CompletionStage<Void> removeCache(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Description copied from interface:LocalConfigurationStorage
Removes the specified cache.- Specified by:
removeCache
in interfaceLocalConfigurationStorage
- Parameters:
name
- the name of the cache to removeflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
removeCacheSync
protected void removeCacheSync(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)
-
removeTemplate
public CompletionStage<Void> removeTemplate(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)
Description copied from interface:LocalConfigurationStorage
Removes the specified template.- Specified by:
removeTemplate
in interfaceLocalConfigurationStorage
- Parameters:
name
- the name of the template to removeflags
- the desiredCacheContainerAdmin.AdminFlag
s
-
removeTemplateSync
protected void removeTemplateSync(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)
-
loadAllCaches
public Map<String,Configuration> loadAllCaches()
Description copied from interface:LocalConfigurationStorage
Loads all persisted cache configurations- Specified by:
loadAllCaches
in interfaceLocalConfigurationStorage
-
loadAllTemplates
public Map<String,Configuration> loadAllTemplates()
Description copied from interface:LocalConfigurationStorage
Loads all persisted templates- Specified by:
loadAllTemplates
in interfaceLocalConfigurationStorage
-
-