public interface CacheContainerAdmin<C extends CacheContainerAdmin,A extends BasicConfiguration>
Modifier and Type | Interface and Description |
---|---|
static class |
CacheContainerAdmin.AdminFlag
Flags which affect only administrative operations
|
Modifier and Type | Method and Description |
---|---|
<K,V> BasicCache<K,V> |
createCache(String name,
A configuration)
Creates a cache on the container using the specified template.
|
<K,V> BasicCache<K,V> |
createCache(String name,
String template)
Creates a cache on the container using the specified template.
|
<K,V> BasicCache<K,V> |
getOrCreateCache(String name,
A configuration)
Retrieves an existing cache or creates one using the specified template if it doesn't exist
|
<K,V> BasicCache<K,V> |
getOrCreateCache(String name,
String template)
Retrieves an existing cache or creates one using the specified template if it doesn't exist
|
void |
removeCache(String name)
Removes a cache from the cache container.
|
C |
withFlags(CacheContainerAdmin.AdminFlag... flags)
Sets any additional
CacheContainerAdmin.AdminFlag s to be used when performing administrative operations. |
C |
withFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)
Sets any additional
CacheContainerAdmin.AdminFlag s to be used when performing administrative operations. |
<K,V> BasicCache<K,V> createCache(String name, String template)
name
- the name of the cache to createtemplate
- the template to use for the cache. If null, the configuration marked as default on the container
will be usedCacheException
- if a cache with the same name already exists<K,V> BasicCache<K,V> createCache(String name, A configuration)
name
- the name of the cache to createconfiguration
- the configuration to use for the cache. If null, the configuration marked as default on the container
will be usedCacheException
- if a cache with the same name already exists<K,V> BasicCache<K,V> getOrCreateCache(String name, String template)
name
- the name of the cache to createtemplate
- the template to use for the cache. If null, the configuration marked as default on the container
will be used<K,V> BasicCache<K,V> getOrCreateCache(String name, A configuration)
name
- the name of the cache to createconfiguration
- the configuration to use for the cache. If null, the configuration marked as default on the container
will be usedvoid removeCache(String name)
name
- the name of the cache to removeC withFlags(CacheContainerAdmin.AdminFlag... flags)
CacheContainerAdmin.AdminFlag
s to be used when performing administrative operations.
Note: whether an operation supports a certain flag or not is dependent on the configuration and environment.
If a flag cannot be honored, the operation will fail with an exception.flags
- C withFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)
CacheContainerAdmin.AdminFlag
s to be used when performing administrative operations.
Note: whether an operation supports a certain flag or not is dependent on the configuration and environment.
If a flag cannot be honored, the operation will fail with an exception.flags
- Copyright © 2021 JBoss by Red Hat. All rights reserved.