Interface CacheLoaderWriterProvider

    • Method Detail

      • createCacheLoaderWriter

        <K,​V> CacheLoaderWriter<? super K,​V> createCacheLoaderWriter​(java.lang.String alias,
                                                                                 CacheConfiguration<K,​V> cacheConfiguration)
        Creates a CacheLoaderWriter for use with the Cache of the given alias and configuration.
        Type Parameters:
        K - the loader-writer key type
        V - the loader-writer value type
        Parameters:
        alias - the Cache alias in the CacheManager
        cacheConfiguration - the configuration for the associated cache
        Returns:
        the CacheLoaderWriter to be used by the Cache or null if none
      • releaseCacheLoaderWriter

        void releaseCacheLoaderWriter​(java.lang.String alias,
                                      CacheLoaderWriter<?,​?> cacheLoaderWriter)
                               throws java.lang.Exception
        Releases a CacheLoaderWriter when the associated Cache is finished with it.

        If the CacheLoaderWriter instance was user provided close will not be invoked.

        Parameters:
        alias - the Cache alias in the CacheManager
        cacheLoaderWriter - the CacheLoaderWriter being released
        Throws:
        java.lang.Exception - when the release fails
      • getPreConfiguredCacheLoaderWriterConfig

        CacheLoaderWriterConfiguration<?> getPreConfiguredCacheLoaderWriterConfig​(java.lang.String alias)
        Returns preconfigured CacheLoaderWriterConfiguration for the given alias
        Parameters:
        alias - the Cache alias in the CacheManager
        Returns:
        CacheLoaderWriterConfiguration configured for the Cache, otherwise null
      • isLoaderJsrProvided

        boolean isLoaderJsrProvided​(java.lang.String alias)
        Checks whether CacheLoaderWriter was provided using jsr api
        Parameters:
        alias - the Cache alias in the CacheManager
        Returns:
        true if CacheLoaderWriter was provided using jsr api, otherwise false.