Class RemoteCacheManagerAdminImpl
- java.lang.Object
-
- org.infinispan.client.hotrod.impl.RemoteCacheManagerAdminImpl
-
- All Implemented Interfaces:
RemoteCacheManagerAdmin,org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
public class RemoteCacheManagerAdminImpl extends Object implements RemoteCacheManagerAdmin
- Since:
- 9.1
- Author:
- Tristan Tarrant
-
-
Field Summary
Fields Modifier and Type Field Description static StringCACHE_CONFIGURATIONstatic StringCACHE_NAMEstatic StringCACHE_TEMPLATEstatic StringFLAGS
-
Constructor Summary
Constructors Constructor Description RemoteCacheManagerAdminImpl(RemoteCacheManager cacheManager, OperationsFactory operationsFactory, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags, Consumer<String> remover)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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>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, org.infinispan.commons.configuration.BasicConfiguration configuration)Creates a cache on the remote server cluster using the specified configurationvoidcreateTemplate(String name, org.infinispan.commons.configuration.BasicConfiguration configuration)<K,V>
RemoteCache<K,V>getOrCreateCache(String name, String template)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, org.infinispan.commons.configuration.BasicConfiguration configuration)Retrieves an existing cache on the remote server cluster.voidreindexCache(String name)Performs a mass reindexing of the specified cache.voidremoveCache(String name)Removes a cache from the remote server cluster.voidremoveTemplate(String name)voidupdateIndexSchema(String name)Update the index schema state for the given cache, the cache engine is hot restarted so that index persisted or not persisted state will be preserved.RemoteCacheManagerAdminwithFlags(EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags)RemoteCacheManagerAdminwithFlags(org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags)
-
-
-
Field Detail
-
CACHE_NAME
public static final String CACHE_NAME
- See Also:
- Constant Field Values
-
CACHE_TEMPLATE
public static final String CACHE_TEMPLATE
- See Also:
- Constant Field Values
-
CACHE_CONFIGURATION
public static final String CACHE_CONFIGURATION
- See Also:
- Constant Field Values
-
FLAGS
public static final String FLAGS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RemoteCacheManagerAdminImpl
public RemoteCacheManagerAdminImpl(RemoteCacheManager cacheManager, OperationsFactory operationsFactory, EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags, Consumer<String> remover)
-
-
Method Detail
-
createCache
public <K,V> RemoteCache<K,V> createCache(String name, String template) throws HotRodClientException
Description copied from interface:RemoteCacheManagerAdminCreates a cache on the remote server cluster using the specified template name.- Specified by:
createCachein interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>- Specified by:
createCachein interfaceRemoteCacheManagerAdmin- Parameters:
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 used- Returns:
- the cache
- Throws:
HotRodClientException
-
createCache
public <K,V> RemoteCache<K,V> createCache(String name, DefaultTemplate template) throws HotRodClientException
Description copied from interface:RemoteCacheManagerAdminCreates a cache on the remote server cluster using the specified default configuration template present in the server.- Specified by:
createCachein interfaceRemoteCacheManagerAdmin- Parameters:
name- the name of the cache to createtemplate-DefaultTemplateenum- Returns:
- the cache
- Throws:
HotRodClientException
-
createCache
public <K,V> RemoteCache<K,V> createCache(String name, org.infinispan.commons.configuration.BasicConfiguration configuration) throws HotRodClientException
Description copied from interface:RemoteCacheManagerAdminCreates a cache on the remote server cluster using the specified configuration- Specified by:
createCachein interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>- Specified by:
createCachein interfaceRemoteCacheManagerAdmin- Parameters:
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. A cache configuration fragment on its own is valid XML.- Returns:
- the cache
- Throws:
HotRodClientException
-
getOrCreateCache
public <K,V> RemoteCache<K,V> getOrCreateCache(String name, String template) throws HotRodClientException
Description copied from interface:RemoteCacheManagerAdminRetrieves an existing cache on the remote server cluster. If it doesn't exist, it will be created using the specified template name.- Specified by:
getOrCreateCachein interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>- Specified by:
getOrCreateCachein interfaceRemoteCacheManagerAdmin- Parameters:
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 used- Returns:
- the cache
- Throws:
HotRodClientException
-
getOrCreateCache
public <K,V> RemoteCache<K,V> getOrCreateCache(String name, DefaultTemplate template) throws HotRodClientException
Description copied from interface:RemoteCacheManagerAdminRetrieves an existing cache on the remote server cluster. If it doesn't exist, it will be created using the specified default template that is present in the server.- Specified by:
getOrCreateCachein interfaceRemoteCacheManagerAdmin- Parameters:
name- the name of the cache to createtemplate-DefaultTemplateenum- Returns:
- the cache
- Throws:
HotRodClientException
-
getOrCreateCache
public <K,V> RemoteCache<K,V> getOrCreateCache(String name, org.infinispan.commons.configuration.BasicConfiguration configuration) throws HotRodClientException
Description copied from interface:RemoteCacheManagerAdminRetrieves an existing cache on the remote server cluster. If it doesn't exist, it will be created using the specified configuration.- Specified by:
getOrCreateCachein interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>- Specified by:
getOrCreateCachein interfaceRemoteCacheManagerAdmin- Parameters:
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. A cache configuration fragment on its own is valid XML.- Returns:
- the cache
- Throws:
HotRodClientException
-
removeCache
public void removeCache(String name)
Description copied from interface:RemoteCacheManagerAdminRemoves a cache from the remote server cluster.- Specified by:
removeCachein interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>- Specified by:
removeCachein interfaceRemoteCacheManagerAdmin- Parameters:
name- the name of the cache to remove
-
withFlags
public RemoteCacheManagerAdmin withFlags(org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags)
- Specified by:
withFlagsin interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
-
withFlags
public RemoteCacheManagerAdmin withFlags(EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags)
- Specified by:
withFlagsin interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
-
reindexCache
public void reindexCache(String name) throws HotRodClientException
Description copied from interface:RemoteCacheManagerAdminPerforms a mass reindexing of the specified cache. The command will return immediately and the reindexing will be performed asynchronously- Specified by:
reindexCachein interfaceRemoteCacheManagerAdmin- Parameters:
name- the name of the cache to reindex- Throws:
HotRodClientException
-
updateIndexSchema
public void updateIndexSchema(String name) throws HotRodClientException
Description copied from interface:RemoteCacheManagerAdminUpdate the index schema state for the given cache, the cache engine is hot restarted so that index persisted or not persisted state will be preserved.- Specified by:
updateIndexSchemain interfaceRemoteCacheManagerAdmin- Parameters:
name- the name of the cache on which the index schema will be updated- Throws:
HotRodClientException
-
createTemplate
public void createTemplate(String name, org.infinispan.commons.configuration.BasicConfiguration configuration)
- Specified by:
createTemplatein interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
-
removeTemplate
public void removeTemplate(String name)
- Specified by:
removeTemplatein interfaceorg.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
-
-