Interface IResourceStoreManager.IVersionedResourceStoreWithLoaderBase<Key,​Value>

    • Method Detail

      • computeIfAbsent

        Value computeIfAbsent​(Key key,
                              Object version)
                       throws IOException
        Gets the value for the given key. The version controls whether the value is still valid. If the version 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.
        version - The version of key.
        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.