Interface CacheContainerAdmin<C extends CacheContainerAdmin,​A extends BasicConfiguration>

    • Method Detail

      • createCache

        <K,​V> BasicCache<K,​V> createCache​(String name,
                                                      String template)
        Creates a cache on the container using the specified template.
        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 container will be used
        Returns:
        the cache
        Throws:
        CacheException - if a cache with the same name already exists
      • createCache

        <K,​V> BasicCache<K,​V> createCache​(String name,
                                                      A configuration)
        Creates a cache on the container using the specified template.
        Parameters:
        name - the name of the cache to create
        configuration - the configuration to use for the cache. If null, the configuration marked as default on the container will be used
        Returns:
        the cache
        Throws:
        CacheException - if a cache with the same name already exists
      • getOrCreateCache

        <K,​V> BasicCache<K,​V> getOrCreateCache​(String name,
                                                           String template)
        Retrieves an existing cache or creates one using the specified template if it doesn't exist
        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 container will be used
        Returns:
        the cache
      • getOrCreateCache

        <K,​V> BasicCache<K,​V> getOrCreateCache​(String name,
                                                           A configuration)
        Retrieves an existing cache or creates one using the specified template if it doesn't exist
        Parameters:
        name - the name of the cache to create
        configuration - the configuration to use for the cache. If null, the configuration marked as default on the container will be used
        Returns:
        the cache
      • removeCache

        void removeCache​(String name)
        Removes a cache from the cache container. Any persisted data will be cleared.
        Parameters:
        name - the name of the cache to remove
      • withFlags

        C withFlags​(CacheContainerAdmin.AdminFlag... flags)
        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.
        Parameters:
        flags -
        Returns:
      • withFlags

        C withFlags​(EnumSet<CacheContainerAdmin.AdminFlag> flags)
        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.
        Parameters:
        flags -
        Returns: