Interface RepositoryCache


@Deprecated public interface RepositoryCache
Deprecated.
Caches auxiliary data used during repository access like already processed metadata. The data in the cache is meant for exclusive consumption by the repository system and is opaque to the cache implementation.
Author:
Benjamin Bentmann
  • Method Summary

    Modifier and Type
    Method
    Description
    get(RepositoryRequest request, Object key)
    Deprecated.
    Gets the specified data from the cache.
    void
    put(RepositoryRequest request, Object key, Object data)
    Deprecated.
    Puts the specified data into the cache.
  • Method Details

    • put

      void put(RepositoryRequest request, Object key, Object data)
      Deprecated.
      Puts the specified data into the cache. Warning: The cache will directly save the provided reference. If the cached data is mutable, i.e. could be modified after being put into the cache, the caller is responsible for creating a copy of the original data and store the copy in the cache.
      Parameters:
      request - The repository request from which this cache was retrieved, must not be null.
      key - The key to use associate the data with, must not be null.
      data - The data to store in the cache, may be null.
    • get

      Object get(RepositoryRequest request, Object key)
      Deprecated.
      Gets the specified data from the cache. Warning: The cache will directly return the saved reference. If the cached data is to be modified after its retrieval, the caller is responsible to create a copy of the returned data and use this instead of the cache record.
      Parameters:
      request - The repository request from which this cache was retrieved, must not be null.
      key - The key to use for lookup of the data, must not be null.
      Returns:
      The requested data or null if none was present in the cache.