public class DefaultCacheManagerAdmin extends java.lang.Object implements EmbeddedCacheManagerAdmin
EmbeddedCacheManagerAdminCacheContainerAdmin.AdminFlag| Modifier and Type | Method and Description |
|---|---|
<K,V> Cache<K,V> |
createCache(java.lang.String cacheName,
Configuration configuration)
Creates a cache across the cluster.
|
<K,V> Cache<K,V> |
createCache(java.lang.String cacheName,
java.lang.String template)
Creates a cache on the container using the specified template.
|
<K,V> Cache<K,V> |
getOrCreateCache(java.lang.String cacheName,
Configuration configuration)
Retrieves an existing cache or creates one across the cluster using the specified configuration.
|
<K,V> Cache<K,V> |
getOrCreateCache(java.lang.String cacheName,
java.lang.String template)
Retrieves an existing cache or creates one using the specified template if it doesn't exist
|
void |
removeCache(java.lang.String cacheName)
Removes a cache from the cache container.
|
EmbeddedCacheManagerAdmin |
withFlags(CacheContainerAdmin.AdminFlag... flags)
Sets any additional
CacheContainerAdmin.AdminFlags to be used when performing administrative operations. |
EmbeddedCacheManagerAdmin |
withFlags(java.util.EnumSet<CacheContainerAdmin.AdminFlag> flags)
Sets any additional
CacheContainerAdmin.AdminFlags to be used when performing administrative operations. |
public <K,V> Cache<K,V> createCache(java.lang.String cacheName, Configuration configuration)
EmbeddedCacheManagerAdmincreateCache in interface CacheContainerAdmin<EmbeddedCacheManagerAdmin,Configuration>createCache in interface EmbeddedCacheManagerAdminK - the generic type of the keyV - the generic type of the valuecacheName - the name of the cacheconfiguration - the configuration to use. It must be a clustered configuration (e.g. distributed)public <K,V> Cache<K,V> getOrCreateCache(java.lang.String cacheName, Configuration configuration)
EmbeddedCacheManagerAdmingetOrCreateCache in interface CacheContainerAdmin<EmbeddedCacheManagerAdmin,Configuration>getOrCreateCache in interface EmbeddedCacheManagerAdminK - the generic type of the keyV - the generic type of the valuecacheName - the name of the cacheconfiguration - the configuration to use. It must be a clustered configuration (e.g. distributed)public <K,V> Cache<K,V> createCache(java.lang.String cacheName, java.lang.String template)
EmbeddedCacheManagerAdmincreateCache in interface CacheContainerAdmin<EmbeddedCacheManagerAdmin,Configuration>createCache in interface EmbeddedCacheManagerAdmincacheName - 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 usedpublic <K,V> Cache<K,V> getOrCreateCache(java.lang.String cacheName, java.lang.String template)
EmbeddedCacheManagerAdmingetOrCreateCache in interface CacheContainerAdmin<EmbeddedCacheManagerAdmin,Configuration>getOrCreateCache in interface EmbeddedCacheManagerAdmincacheName - 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 usedpublic void removeCache(java.lang.String cacheName)
CacheContainerAdminremoveCache in interface CacheContainerAdmin<EmbeddedCacheManagerAdmin,Configuration>cacheName - the name of the cache to removepublic EmbeddedCacheManagerAdmin withFlags(CacheContainerAdmin.AdminFlag... flags)
CacheContainerAdminCacheContainerAdmin.AdminFlags 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.withFlags in interface CacheContainerAdmin<EmbeddedCacheManagerAdmin,Configuration>public EmbeddedCacheManagerAdmin withFlags(java.util.EnumSet<CacheContainerAdmin.AdminFlag> flags)
CacheContainerAdminCacheContainerAdmin.AdminFlags 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.withFlags in interface CacheContainerAdmin<EmbeddedCacheManagerAdmin,Configuration>