Class RemoteCacheManagerAdminImpl

    • Constructor Detail

      • RemoteCacheManagerAdminImpl

        public RemoteCacheManagerAdminImpl​(RemoteCacheManager cacheManager,
                                           org.infinispan.client.hotrod.impl.operations.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,
                                                              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 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.
        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.
        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,
                                                                   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 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.
        Returns:
        the cache
        Throws:
        HotRodClientException
      • createCache

        public void createCache​(String name,
                                String template,
                                EnumSet<AdminFlag> flags)
        Description copied from interface: RemoteCacheManagerAdmin
        Creates a cache on the remote server cluster using the specified template and flags.
        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
        flags - an EnumSet of flags to use when creating the cache. See CacheContainerAdmin.AdminFlag
      • 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)
        Description copied from interface: org.infinispan.commons.api.CacheContainerAdmin
        Sets any additional CacheContainerAdmin.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.
        Specified by:
        withFlags in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,​org.infinispan.commons.configuration.BasicConfiguration>
        Returns:
      • withFlags

        public RemoteCacheManagerAdmin withFlags​(EnumSet<org.infinispan.commons.api.CacheContainerAdmin.AdminFlag> flags)
        Description copied from interface: org.infinispan.commons.api.CacheContainerAdmin
        Sets any additional CacheContainerAdmin.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.
        Specified by:
        withFlags in interface org.infinispan.commons.api.CacheContainerAdmin<RemoteCacheManagerAdmin,​org.infinispan.commons.configuration.BasicConfiguration>
        Returns: