Interface GlobalConfigurationManager
- All Known Implementing Classes:
GlobalConfigurationManagerImpl
public interface GlobalConfigurationManager
The
GlobalConfigurationManager is the main interface for sharing runtime configuration state across a cluster.
It uses an internal cache 'org.infinispan.CONFIG'. The cache is keyed with ScopedState. Each scope owner is responsible
for its own keys.- Since:
- 9.2
- Author:
- Tristan Tarrant
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptioncreateCache(String cacheName, String template, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide cache configuration using the supplied templatecreateCache(String cacheName, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide cache configurationcreateTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide configuration templategetOrCreateCache(String cacheName, String template, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide cache configuration using the supplied template or retrieves an existing onegetOrCreateCache(String cacheName, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide cache configuration or retrieves an existing onegetOrCreateTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide configuration template<V> Cache<ScopedState, V> Returns the global state cachedefault voidremoveCache(String cacheName, EnumSet<CacheContainerAdmin.AdminFlag> flags) Removes a cluster-wide cache and its configurationremoveTemplate(String name, EnumSet<CacheContainerAdmin.AdminFlag> flags) Removes a cluster-wide template
-
Field Details
-
CONFIG_STATE_CACHE_NAME
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Method Details
-
postStart
default void postStart() -
getStateCache
Returns the global state cache -
createTemplate
CompletionStage<Void> createTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide configuration template- Parameters:
name- the name of the templateconfiguration- the configuration objectflags- the flags to apply
-
getOrCreateTemplate
CompletionStage<Configuration> getOrCreateTemplate(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide configuration template- Parameters:
name- the name of the templateconfiguration- the configuration objectflags- the flags to apply
-
createCache
CompletionStage<Configuration> createCache(String cacheName, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide cache configuration- Parameters:
cacheName- the name of the configurationconfiguration- the configuration objectflags- the flags to apply
-
getOrCreateCache
CompletionStage<Configuration> getOrCreateCache(String cacheName, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide cache configuration or retrieves an existing one- Parameters:
cacheName- the name of the configurationconfiguration- the configuration objectflags- the flags to apply
-
createCache
CompletionStage<Configuration> createCache(String cacheName, String template, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide cache configuration using the supplied template- Parameters:
cacheName- the name of the configurationtemplate- the template name to useflags- the flags to apply
-
getOrCreateCache
CompletionStage<Configuration> getOrCreateCache(String cacheName, String template, EnumSet<CacheContainerAdmin.AdminFlag> flags) Defines a cluster-wide cache configuration using the supplied template or retrieves an existing one- Parameters:
cacheName- the name of the configurationtemplate- the template name to useflags- the flags to apply
-
removeCache
Removes a cluster-wide cache and its configuration- Parameters:
cacheName- the name of the cacheflags-
-
removeTemplate
Removes a cluster-wide template- Parameters:
name- the name of the templateflags-
-