public class ImmutableLocalConfigurationStorage extends Object implements LocalConfigurationStorage
LocalConfigurationStorage
which does not allow cache creation/removal.Constructor and Description |
---|
ImmutableLocalConfigurationStorage() |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
createCache(String name,
String template,
Configuration configuration,
EnumSet<CacheContainerAdmin.AdminFlag> flags)
Creates the cache using the supplied template, configuration and flags.
|
void |
initialize(EmbeddedCacheManager embeddedCacheManager,
ConfigurationManager configurationManager,
BlockingManager blockingManager)
Initialization entry point for the
LocalConfigurationStorage |
Map<String,Configuration> |
loadAll()
Loads all persisted cache configurations
|
CompletableFuture<Void> |
removeCache(String name,
EnumSet<CacheContainerAdmin.AdminFlag> flags)
Removes the specified cache.
|
void |
validateFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)
Checks whether this
LocalConfigurationStorage supports the supplied flags. |
protected static Log log
public void initialize(EmbeddedCacheManager embeddedCacheManager, ConfigurationManager configurationManager, BlockingManager blockingManager)
LocalConfigurationStorage
LocalConfigurationStorage
initialize
in interface LocalConfigurationStorage
blockingManager
- handler to use when a blocking operation is requiredpublic void validateFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)
LocalConfigurationStorage
LocalConfigurationStorage
supports the supplied flags.
A CacheConfigurationException
will be thrown in case this cannot be done.validateFlags
in interface LocalConfigurationStorage
public CompletableFuture<Void> createCache(String name, String template, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags)
LocalConfigurationStorage
LocalConfigurationStorage
should use it, e.g. when persisting the configuration.createCache
in interface LocalConfigurationStorage
name
- the name of the cache to createtemplate
- the template that should be used to configure the cache. Can be null.configuration
- the Configuration
to useflags
- the desired CacheContainerAdmin.AdminFlag
spublic CompletableFuture<Void> removeCache(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags)
LocalConfigurationStorage
removeCache
in interface LocalConfigurationStorage
name
- the name of the cache to removeflags
- the desired CacheContainerAdmin.AdminFlag
spublic Map<String,Configuration> loadAll()
LocalConfigurationStorage
loadAll
in interface LocalConfigurationStorage
Copyright © 2021 JBoss by Red Hat. All rights reserved.