public class RemoteCacheManagerAdminImpl extends Object implements RemoteCacheManagerAdmin
CacheContainerAdmin.AdminFlag
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_CONFIGURATION |
static String |
CACHE_NAME |
static String |
CACHE_TEMPLATE |
static String |
FLAGS |
Constructor and Description |
---|
RemoteCacheManagerAdminImpl(RemoteCacheManager cacheManager,
OperationsFactory operationsFactory,
EnumSet<CacheContainerAdmin.AdminFlag> flags,
Consumer<String> remover) |
Modifier and Type | Method and Description |
---|---|
<K,V> RemoteCache<K,V> |
createCache(String name,
BasicConfiguration configuration)
Creates a cache on the remote server cluster using the specified configuration
|
<K,V> RemoteCache<K,V> |
createCache(String name,
DefaultTemplate template)
Creates a cache on the remote server cluster using the specified default configuration template
present in the server.
|
<K,V> RemoteCache<K,V> |
createCache(String name,
String template)
Creates a cache on the remote server cluster using the specified template name.
|
<K,V> RemoteCache<K,V> |
getOrCreateCache(String name,
BasicConfiguration configuration)
Retrieves an existing cache on the remote server cluster.
|
<K,V> RemoteCache<K,V> |
getOrCreateCache(String name,
DefaultTemplate template)
Retrieves an existing cache on the remote server cluster.
|
<K,V> RemoteCache<K,V> |
getOrCreateCache(String name,
String template)
Retrieves an existing cache on the remote server cluster.
|
void |
reindexCache(String name)
Performs a mass reindexing of the specified cache.
|
void |
removeCache(String name)
Removes a cache from the remote server cluster.
|
RemoteCacheManagerAdmin |
withFlags(CacheContainerAdmin.AdminFlag... flags)
Sets any additional
CacheContainerAdmin.AdminFlag s to be used when performing administrative operations. |
RemoteCacheManagerAdmin |
withFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)
Sets any additional
CacheContainerAdmin.AdminFlag s to be used when performing administrative operations. |
public static final String CACHE_NAME
public static final String CACHE_TEMPLATE
public static final String CACHE_CONFIGURATION
public static final String FLAGS
public RemoteCacheManagerAdminImpl(RemoteCacheManager cacheManager, OperationsFactory operationsFactory, EnumSet<CacheContainerAdmin.AdminFlag> flags, Consumer<String> remover)
public <K,V> RemoteCache<K,V> createCache(String name, String template) throws HotRodClientException
RemoteCacheManagerAdmin
createCache
in interface RemoteCacheManagerAdmin
createCache
in interface CacheContainerAdmin<RemoteCacheManagerAdmin,BasicConfiguration>
name
- the name of the cache to createtemplate
- the template to use for the cache. If null, the configuration marked as default on the server
will be usedHotRodClientException
public <K,V> RemoteCache<K,V> createCache(String name, DefaultTemplate template) throws HotRodClientException
RemoteCacheManagerAdmin
createCache
in interface RemoteCacheManagerAdmin
name
- the name of the cache to createtemplate
- DefaultTemplate
enumHotRodClientException
public <K,V> RemoteCache<K,V> createCache(String name, BasicConfiguration configuration) throws HotRodClientException
RemoteCacheManagerAdmin
createCache
in interface RemoteCacheManagerAdmin
createCache
in interface CacheContainerAdmin<RemoteCacheManagerAdmin,BasicConfiguration>
name
- the name of the cache to createconfiguration
- a concrete configuration that will be sent to the server. The XML representation of this
configuration must use the Infinispan embedded configuration schema in a version supported
by the server.HotRodClientException
public <K,V> RemoteCache<K,V> getOrCreateCache(String name, String template) throws HotRodClientException
RemoteCacheManagerAdmin
getOrCreateCache
in interface RemoteCacheManagerAdmin
getOrCreateCache
in interface CacheContainerAdmin<RemoteCacheManagerAdmin,BasicConfiguration>
name
- the name of the cache to createtemplate
- the template to use for the cache. If null, the configuration marked as default on the server
will be usedHotRodClientException
public <K,V> RemoteCache<K,V> getOrCreateCache(String name, DefaultTemplate template) throws HotRodClientException
RemoteCacheManagerAdmin
getOrCreateCache
in interface RemoteCacheManagerAdmin
name
- the name of the cache to createtemplate
- DefaultTemplate
enumHotRodClientException
public <K,V> RemoteCache<K,V> getOrCreateCache(String name, BasicConfiguration configuration) throws HotRodClientException
RemoteCacheManagerAdmin
getOrCreateCache
in interface RemoteCacheManagerAdmin
getOrCreateCache
in interface CacheContainerAdmin<RemoteCacheManagerAdmin,BasicConfiguration>
name
- the name of the cache to createconfiguration
- a concrete configuration that will be sent to the server. The XML representation of this
configuration must use the Infinispan embedded configuration schema in a version supported
by the server.HotRodClientException
public void removeCache(String name)
RemoteCacheManagerAdmin
removeCache
in interface RemoteCacheManagerAdmin
removeCache
in interface CacheContainerAdmin<RemoteCacheManagerAdmin,BasicConfiguration>
name
- the name of the cache to removepublic RemoteCacheManagerAdmin withFlags(CacheContainerAdmin.AdminFlag... flags)
CacheContainerAdmin
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.withFlags
in interface CacheContainerAdmin<RemoteCacheManagerAdmin,BasicConfiguration>
public RemoteCacheManagerAdmin withFlags(EnumSet<CacheContainerAdmin.AdminFlag> flags)
CacheContainerAdmin
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.withFlags
in interface CacheContainerAdmin<RemoteCacheManagerAdmin,BasicConfiguration>
public void reindexCache(String name) throws HotRodClientException
RemoteCacheManagerAdmin
reindexCache
in interface RemoteCacheManagerAdmin
name
- the name of the cache to reindexHotRodClientException
Copyright © 2021 JBoss by Red Hat. All rights reserved.