Interface FunctionalCacheLoader<K,​V>

    • Method Detail

      • load

        V load​(K key)
        throws Exception
        Deprecated.
        Description copied from interface: CacheLoader
        Retrieves or generates data based on the key.

        From inside this method it is illegal to call methods on the same cache. This may cause a deadlock.

        API rationale: This method declares an exception to allow any unhandled exceptions of the loader implementation to just pass through. Since the cache needs to catch an deal with loader exceptions in any way, this saves otherwise necessary try/catch clauses in the loader.

        Specified by:
        load in interface CacheLoader<K,​V>
        Parameters:
        key - the non-null key to provide the value for.
        Returns:
        value to be associated with the key. If the cache does not permit null values a NullPointerException is thrown, but the expiry policy is called before it.
        Throws:
        Exception - Unhandled exception from the loader. Exceptions are suppressed or wrapped and rethrown via a CacheLoaderException. Rethrow
        See Also:
        CacheLoader.load(Object)