Interface IResourceStoreManager.IVersionedResourceStoreWithLoaderAndVersionExtractor<Key,​Value>

    • Method Detail

      • computeIfAbsent

        Value computeIfAbsent​(Key key)
                       throws IOException
        Gets the value for the given key. The version controls whether the value is still valid. If the version obtained from the bound version extractor is different from the stored version of the file, the value is considered stale. Stales values are discarded and reloaded using the bound loader.
        Parameters:
        key - The key for which to get the value.
        Returns:
        The associated value, either from the store if still fresh, or obtained from the bound loader.
        Throws:
        IOException - If the loader throws an exception.