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 Details

  • Constructor Details

  • Method Details

    • createCache

      public <K, V> RemoteCache<K,V> createCache(String name, String template) throws HotRodClientException
      Description copied from interface: RemoteCacheManagerAdmin
      Creates a cache on the remote server cluster using the specified template name.
      Specified by:
      createCache in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
      Specified by:
      createCache in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache to create
      template - 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: RemoteCacheManagerAdmin
      Creates a cache on the remote server cluster using the specified default configuration template present in the server.
      Specified by:
      createCache in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache to create
      template - DefaultTemplate enum
      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: RemoteCacheManagerAdmin
      Creates a cache on the remote server cluster using the specified configuration
      Specified by:
      createCache in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
      Specified by:
      createCache in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache to create
      configuration - a concrete cache configuration that will be sent to the server in one of the supported formats: XML, JSON, and YAML. The server detects the format automatically. The configuration must conform to the Infinispan embedded configuration schema version that is supported by the server.
      Returns:
      the cache
      Throws:
      HotRodClientException
    • getOrCreateCache

      public <K, V> RemoteCache<K,V> getOrCreateCache(String name, String template) throws HotRodClientException
      Description copied from interface: RemoteCacheManagerAdmin
      Retrieves an existing cache on the remote server cluster. If it doesn't exist, it will be created using the specified template name.
      Specified by:
      getOrCreateCache in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
      Specified by:
      getOrCreateCache in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache to create
      template - 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: RemoteCacheManagerAdmin
      Retrieves 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:
      getOrCreateCache in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache to create
      template - DefaultTemplate enum
      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: RemoteCacheManagerAdmin
      Retrieves an existing cache on the remote server cluster. If it doesn't exist, it will be created using the specified configuration.
      Specified by:
      getOrCreateCache in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
      Specified by:
      getOrCreateCache in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache to create
      configuration - a concrete cache configuration of that will be sent to the server in one of the supported formats: XML, JSON and YAML. The format will be detected automatically. The configuration must use the Infinispan embedded configuration schema in a version supported by the server.
      Returns:
      the cache
      Throws:
      HotRodClientException
    • removeCache

      public void removeCache(String name)
      Description copied from interface: RemoteCacheManagerAdmin
      Removes a cache from the remote server cluster.
      Specified by:
      removeCache in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
      Specified by:
      removeCache in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache to remove
    • withFlags

      public RemoteCacheManagerAdmin withFlags(org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags)
      Specified by:
      withFlags in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
    • withFlags

      public RemoteCacheManagerAdmin withFlags(EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags)
      Specified by:
      withFlags in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
    • reindexCache

      public void reindexCache(String name) throws HotRodClientException
      Description copied from interface: RemoteCacheManagerAdmin
      Performs a mass reindexing of the specified cache. The command will return immediately and the reindexing will be performed asynchronously
      Specified by:
      reindexCache in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache to reindex
      Throws:
      HotRodClientException
    • updateIndexSchema

      public void updateIndexSchema(String name) throws HotRodClientException
      Description copied from interface: RemoteCacheManagerAdmin
      Updates 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:
      updateIndexSchema in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache on which the index schema will be updated
      Throws:
      HotRodClientException
    • updateConfigurationAttribute

      public void updateConfigurationAttribute(String name, String attribute, String value) throws HotRodClientException
      Description copied from interface: RemoteCacheManagerAdmin
      Updates a mutable configuration attribute for the given cache.
      Specified by:
      updateConfigurationAttribute in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
      Specified by:
      updateConfigurationAttribute in interface RemoteCacheManagerAdmin
      Parameters:
      name - the name of the cache on which the attribute will be updated
      attribute - the path of the attribute we want to change
      value - the new value to apply to the attribute
      Throws:
      HotRodClientException
    • createTemplate

      public void createTemplate(String name, org.infinispan.commons.configuration.BasicConfiguration configuration)
      Specified by:
      createTemplate in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
    • removeTemplate

      public void removeTemplate(String name)
      Specified by:
      removeTemplate in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
    • assignAlias

      public void assignAlias(String aliasName, String cacheName) throws HotRodClientException
      Description copied from interface: RemoteCacheManagerAdmin
      Assign an alias to a cache. If the alias was already associated with another cache, the association will be reassigned to the specified cache. If the alias was not associated with any cache, it is created and associated to the specified cache. If the alias was already associated with the specified cache, this operation does nothing.
      Specified by:
      assignAlias in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,org.infinispan.commons.configuration.BasicConfiguration>
      Specified by:
      assignAlias in interface RemoteCacheManagerAdmin
      Parameters:
      aliasName - the name of the alias
      cacheName - the name of the cache to which the alias should be associated
      Throws:
      HotRodClientException